Read file from drive in google colab

前端 未结 5 1421
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 06:24

I Have read the notebook about how to open drive. I already did as instructed using:

from google.colab import drive
drive.mount(\'/content/drive\')
         


        
5条回答
  •  醉话见心
    2021-01-13 07:05

    I (partially) found out what was going on based on Bob Smith and Ami F's answers.
    I believe google drive blocks read access from files converted to drive formats (gsheet, gdoc, etc.). And so, whenever I tried to use !cat or open, I got an "operation unsupported" error. When I tried Bob's example, creating a file and then reading it, it worked on my notebook.
    So I managed to prevent google from converting files, deleted the old files and uploaded everything to drive again. Now, all my csv's were being kept unchanged (no .gsheet extesion) and I am able to access them using open.

提交回复
热议问题