FileNotFoundError from os.walk()
- FileNotFoundError
- os.walk
- path
- open
os.walk()
generates a 3-tuple of directory
, files
, and subdirectories
. Many beginners attempt to access entries from the latter two directly, but they are relative to directory
, so you have to add that back on, like open(os.path.join(directory, entry))