Google Colab - 谷歌驱动器授权错误

时间:2021-06-09 17:18:54

标签: google-colaboratory

我正在尝试通过以下代码将我的 colab 链接到谷歌驱动器:

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

它一直有效直到今天,点击 oauth2 链接只会给我带来以下屏幕

Error 403: access_denied screen

我尝试注销所有谷歌帐户,使用隐身模式等,但它们都不起作用

我将不胜感激。

非常感谢!

1 个答案:

答案 0 :(得分:0)

在 Colab 中有很多方法可以挂载或链接 Google Drive:

  1. 通过单击此图标,使用 Colab 本身进行连接: enter image description here

  2. 使用这些命令连接:

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

结论

enter image description here

复制验证码而不是单击复制按钮将解决您的问题。复制按钮的代码中似乎存在java脚本兼容性问题。按 Ctrl+A 然后按 Ctrl+C 复制验证码。之后返回 colab 并在此处使用 Ctrl+V 粘贴它: Image