How to fix NotADirectoryError: [Errno 20] Not a directory: 'filename' in Python | DevErrors