Error when i want to use a file from driv in colab
from google.colab import drive
drive.mount('/content/drive')
and them
INPUT_DIRECTORY='/content/drive/My Drive/deepcumbia/data/xml'
error:
Could not find directory /content/drive/My/
Error when i want to use a file from driv in colab
from google.colab import drive
drive.mount('/content/drive')
and them
INPUT_DIRECTORY='/content/drive/My Drive/deepcumbia/data/xml'
error:
Could not find directory /content/drive/My/
Escape the space.
INPUT_DIRECTORY='/content/drive/My\ Drive/deepcumbia/data/xml'
This is to add another way which worked for me, i.e. double check the actual directory path in colab.
When debugging this same issue, I noticed Google Colab takes the Google Drive default directory a bit different. E.g. in Google Colab, the directory looked like this, there is no space in the word "MyDrive":
But when I browsed to the Google Drive, noticed there is a space in "My Drive":
So, for my case, I changed from:
sth= pd.read_csv('/content/drive/My Drive/Colab Notebooks/Datasets/xyz.csv', index_col='abc')
to
sth= pd.read_csv('/content/drive/MyDrive/Colab Notebooks/Datasets/xyz.csv', index_col='abc')
Then it worked.
I have had similar issues before too. This problem comes up when there is space in the link or path.
Thus, here's the universal solution : add a \ before the space.
So, if it's dir = 'My Drive'
, change it to dir = 'My\ Drive'
.
It will always work.
Moreover, here's the solution to your problem:
INPUT_DIRECTORY='/content/drive/My\ Drive/deepcumbia/data/xml'