【发布时间】:2020-12-23 11:38:31
【问题描述】:
几天以来,我无法连接到 google colaboratory 中的 google drive。
这里是代码,以前总是有效的:
from google.colab import drive
drive.mount('/content/gdrive/')
在阅读了几个博客以寻求解决方案后,我尝试了以下方法:
->我的谷歌驱动器的第一个文件夹中只有两个项目
-> 我的垃圾文件夹是空的
-> 我重置了所有会话
-> 我创建了一个新文件来测试上面的代码。
-> 我重新启动了我的计算机和我的浏览器 Chrome
-> 我试过 "drive.mount('/content/gdrive')" , drive.mount('/content/gdrive/'), drive.mount('/content/'), drive.mount(' /content'), drive.mount('/content/gdrive/My Drive')
有什么想法吗? 非常感谢!
这是错误:
TIMEOUT Traceback (most recent call last)
<ipython-input-2-9a9a89271754> in <module>()
1 from google.colab import drive
----> 2 drive.mount('/content/gdrive/')
4 frames
/usr/local/lib/python3.6/dist-packages/pexpect/expect.py in timeout(self, err)
142 exc = TIMEOUT(msg)
143 exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
--> 144 raise exc
145
146 def errored(self):
TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f5666fe0a90>
searcher: searcher_re:
0: re.compile('google.colab.drive MOUNTED')
1: re.compile('root@2cd8a6fe3c15-de18aaee18634b4c829aedf956090476: ')
2: re.compile('(Go to this URL in a browser: https://.*)$')
3: re.compile('Drive File Stream encountered a problem and has stopped')
4: re.compile('drive EXITED')
<pexpect.popen_spawn.PopenSpawn object at 0x7f5666fe0a90>
searcher: searcher_re:
0: re.compile('google.colab.drive MOUNTED')
1: re.compile('root@2cd8a6fe3c15-de18aaee18634b4c829aedf956090476: ')
2: re.compile('(Go to this URL in a browser: https://.*)$')
3: re.compile('Drive File Stream encountered a problem and has stopped')
4: re.compile('drive EXITED')
【问题讨论】:
-
-> 我也在Safari浏览器中试过
-
-> 我也试过 drive.mount('/content/drive/',force_remount=True)
-
手动复制/粘贴作为临时修复。该小组意识到并且在它上面。希望尽快修复。干杯!