我正在尝试从Collaborator连接到Google云端硬盘。我链接了云端硬盘,它给了我一个
Connection to Google drive successful message.
但是,当我尝试访问“数据集”文件夹时,会向我抛出
ls: cannot access '/mydrive/Sources/Dataset/': No such file or directory
代码如下。
# Check is Link to Drive is OK
google = !if [ -d 'mydrive/' ]; then echo "1" ; else echo "0"; fi
if (google[0] is '0' ):
from google.colab import drive
drive.mount('/content/mydrive')
!if [ -d 'mydrive/' ]; then echo "Connection to Google drive successful" ; else echo "Error to connect to Google drive"; fi
!ls "/mydrive/Sources/Dataset/"
请帮助。
答案 0 :(得分:1)
粘贴的代码中至少有两个错误:
!ls "/content/mydrive/My Drive/Sources/Dataset/"
如果仍然无法使用,可以在左侧面板中使用文件浏览器,该浏览器可用于浏览/ content目录以查看内容。
(此问题已解锁,现在已被提升为评论的答案)