I run a python 2.7 program with tensorflow on my ubuntu 16.04 machine. At some point (it randomly changes when that happens), the program crashes because os.getcwdu()
fails. I then run python in the same terminal session, try to run import os
followed by os.getcwd()
and get the same error:
OSError: [Errno 2] No such file or directory
only after exiting python (again), going up one directory and re-entering that directory I am able to run this command.
Does anyone have any idea what causes this problem and how to avoid it? Many thanks in advance!