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?
The current directory may have been deleted by another process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With