This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, jschwar313, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-12-15.17:32:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It works as expected for me:

    >>> len(p)
    >>> print(p)
    C:\Temp\Jim\Documents\jschw_uiowtv3_old\AppData\Local\Google\Chrome\User Data\Default\Extensions\nenlahapcbofgnanklpelkaejcehkggg\0.1.823.675_0\notifications\pages\Cashback\components\CashBackResolve\components\RewardsActivation\components\CashbackSectionSimple

os.walk() can list the files in directory `p` if the \\?\ prefix is prepended:

    >>> next(os.walk('\\\\?\\' + p))[-1]

Without the prefix, the internal os.scandir() call fails, but by default the error is ignored:

    >>> next(os.walk(p))[-1]
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>

We can print the exception to see that it's the expected ERROR_PATH_NOT_FOUND (3) error for a path that's too long:

    >>> next(os.walk(p, onerror=print))[-1]
    [WinError 3] The system cannot find the path specified: 'C:\\Temp\\Jim\\Documents\\jschw_uiowtv3_old\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\nenlahapcbofgnanklpelkaejcehkggg\\0.1.823.675_0\\notifications\\pages\\Cashback\\components\\CashBackResolve\\components\\RewardsActivation\\components\\CashbackSectionSimple'
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
Date User Action Args
2021-12-15 17:32:36eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, jschwar313
2021-12-15 17:32:36eryksunsetmessageid: <>
2021-12-15 17:32:36eryksunlinkissue46084 messages
2021-12-15 17:32:36eryksuncreate