I have a quite weird problem happening with my code. I recently upgraded from the old version of Google Drive to the Google File Stream, and, yes, I am working with files in the cloud. Now, the problem: I have a path to a folder on my google drive. If I were to run a path check using path.isdir I get True as a response, but as soon as I run an os.listdir it will return an error, File Not Found. Is there anything I am doing wrong? Thanks for the help.
path_folder = '/Volumes/GoogleDrive/My Drive/NPL/ProtestNPL/regression_useData/training_pickle'
path.isdir(path_fodler)
Out[24]: True
os.listdir(path_folder)
Traceback (most recent call last):
File "<ipython-input-28-fd142a922272>", line 1, in <module>
os.listdir(path_folder)
FileNotFoundError: [Errno 2] No such file or directory: '/Volumes/GoogleDrive/My Drive/NPL/ProtestNPL/regression_useData/training_pickle'
UPDATE 1: I just realized that through spyder I can't even navigate to Google Drive directory anymore Spyder file explorer
UPDATE 2: I thought it had something to do with the fact that I had recently updated spyder to the new stable version 3.2.7, so I downgraded my conda install to the previous revision. The same problem happened. I upgraded it again; same.
UPDATE 3: I realized something, just three days ago my code was working perfectly. It was then that I started playing with tkinter for file selection and saving and after my experiments, the issue began.
The problem had its roots in the fact that I was running spyder on an environment that didn't have the same privileges as the Google File Stream. That is because I manually created my environment using 'sudo su'. To fix the problem I completely uninstalled my python, deleting the environments in the process, and installed Anaconda Navigator to help me with the task.