New submission from Jim Schwartz :
Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not.
I've enclosed sample scripts that compare the two and have returned the
results. the windows 10 registry entry to extend the path names fixes this
issue
(HKEY_LOCAL_MA
Jim Schwartz added the comment:
Here's the second file that works just fine under python 3.9 (by the way, I am
using Windows 64-bit). I didn't test this on later python versions, however,
nor did I test it on 32-bit versions. I see that many people on the internet
have said to
Jim Schwartz added the comment:
yes, I do.
C:\Users\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
Jim Schwartz added the comment:
do you have this registry entry set to 1:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
set to 1. It works if you do. What version of windows do you have? I have
version 21H2 (OS Build 19044.1387). I don't have windo
Jim Schwartz added the comment:
the issue is with the scandir script, not the os_walk script. I tried to
upload the scandir python script before, but I guess it didn't upload. When I
was running the two scripts, I used an input of C:\\ as the input parameter.
Hope that
Jim Schwartz added the comment:
when I run the following command:
python "H:\Users\LindaJim\Documents\AWS Python Learning\test_dir_scan_dir.py"
"C:\\"
I get this output:
...
Traceback (most recent call last):
File "H:\Users\LindaJim\Documents\AWS Python Lear
Jim Schwartz added the comment:
my c drive and h drive are both internal drives and I run the python script
from my user directory on my c drive. Not sure if that makes any difference.
Just trying to think of things that might help you reproduce and fix this
Jim Schwartz added the comment:
Please let me know if you are able to reproduce this issue.
--
___
Python tracker
<https://bugs.python.org/issue46084>
___
___