May-10-2020, 06:24 AM
Is this correct
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
dir = "E:\\Books" p = Path(dir)reference : https://pbpython.com/pages/mailinglist.html
os.walk(p)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
os.walk(dir)works fine