open() gives FileNotFoundError/IOError: Errno 2 No such file or directory

Make sure the file exists: use os.listdir() to see the list of files in the current working directory Make sure you’re in the directory you think you’re in with os.getcwd() (if you launch your code from an IDE, you may well be in a different directory) You can then either: Call os.chdir(dir), dir being the … Read more

Android Kotlin: Getting a FileNotFoundException with filename chosen from file picker?

You did not receive a file path, you received a Uri. You have to use Uri based APIs such as ContentResolver.openInputStream() to access the contents at that Uri as Android does not grant your app direct File access to the underlying file (it could also be streamed from Google Drive or downloaded directly from the … Read more