【问题标题】:Google Drive in Colaboratory is not mounted. TimeOutColaboratory 中的 Google Drive 未安装。暂停
【发布时间】: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)
  • 手动复制/粘贴作为临时修复。该小组意识到并且在它上面。希望尽快修复。干杯!

标签: google-colaboratory


【解决方案1】:

您好,我将验证码复制到记事本上,然后从那里粘贴到 colab 上。它奏效了。

【讨论】:

    【解决方案2】:

    这正在https://github.com/googlecolab/colabtools/issues/1540 中进行跟踪。

    解决方法是使用鼠标拖动而不是使用“复制”按钮来复制 oauth 代码。

    【讨论】:

    • 认真的吗? !我有这么多麻烦和这么简单的解决方案!谢谢大家!
    【解决方案3】:

    似乎有人建议手动复制粘贴生成的身份验证代码,而不是按复制按钮然后粘贴。这对我有用:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-06
      • 1970-01-01
      • 2019-04-20
      • 2019-05-10
      • 2020-06-16
      • 2018-07-29
      • 2020-03-06
      相关资源
      最近更新 更多