0

I am having trouble accessing my google drive files from colab.

First I was successfully able to mount my google drive on colab

All of the following work :

drive.mount(‘/content/gdrive’, force_remount=True) %cd gdrive/MyDrive %ls TriangulationSimulation\ SNOP file1 = ‘TriangulationSimulation\ SNOP/nlog-dump-SNOP-json-950-0.json’ %cat $file1

However I next try to open the very same file (file1) which is a json file :

fsnop = open(file1) (or fsnop = open(file1, “r”))

and I get an error : 'FileNotFoundError: [Errno 2] No such file or directory: ‘TriangulationSimulation\ SNOP/nlog-dump-SNOP-json-950-0.json’

No idea why this is happening - I tried to do it with the full path name and also relative to MyDrive/ - no avail - I am able to access as you can see the file no problem at first and then when I give the file name to open - it doesn't work

(My next step will be to load the json data by doing json.load(fsnop))

thanks for any help ! Farrukh

0 Answers0