May-10-2020, 06:24 AM
Is this correct
reference : https://pbpython.com/pages/mailinglist.html
giving below error:
File "F:\Users\hyg\AppData\Local\Programs\Python\Python35\lib\os.py", line 368, in walk
scandir_it = scandir(top)
TypeError: scandir: illegal type for path parameter
However
works fine
1 2 |
dir = "E:\\Books" p = Path( dir ) |
1 |
os.walk(p) |
File "F:\Users\hyg\AppData\Local\Programs\Python\Python35\lib\os.py", line 368, in walk
scandir_it = scandir(top)
TypeError: scandir: illegal type for path parameter
However
1 |
os.walk( dir ) |