小编cla*_*rky的帖子

Google Colab-ValueError:Mountpoint 必须位于存在的目录中

我想在 google Colab 上挂载谷歌驱动器,我正在使用这个命令来挂载驱动器

from google.colab import drive
drive.mount('/content/drive/')
Run Code Online (Sandbox Code Playgroud)

但我收到此错误

ValueError                               Traceback (most recent call last)
<ipython-input-45-9667a744255b> in <module>()
       1 from google.colab import drive
 ----> 2 drive.mount('content/drive/')

 /usr/local/lib/python3.6/dist-packages/google/colab/drive.py in
 mount(mountpoint, force_remount)
      99       raise ValueError('Mountpoint must either be a directory or not exist')
     100     if '/' in mountpoint and not _os.path.exists(_os.path.dirname(mountpoint)):
 --> 101       raise ValueError('Mountpoint must be in a directory that exists')
     102   except:
     103     d.terminate(force=True)

 ValueError: Mountpoint must be in a directory that exists

Run Code Online (Sandbox Code Playgroud)

python valueerror google-colaboratory

9
推荐指数
3
解决办法
3万
查看次数

标签 统计

google-colaboratory ×1

python ×1

valueerror ×1