I have this program that at one point accesses os.getcwd(), but some times, depending on where the program has gone before getting to that line, it crashes with the message “OSError: [Errno 2] No such file or directory”.
I cannot figure out what i can do wrong then calling os.getcwd(). There’s no arguments, and there should always be a current working directory, right?
I have this program that at one point accesses os.getcwd(), but some times, depending
Share
The current directory may have been deleted by another process.