从google colab Failure(“意外错误响应:

2024-06-16 18:33:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我按照以下说明通过googlecolab访问google drive:gdrive_colab

前两个单元格工作正常,但下面的单元格:

# Generate creds for the Drive FUSE library.
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
# Work around misordering of STREAM and STDIN in Jupyter.
# https://github.com/jupyter/notebook/issues/3159
prompt = !google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass(prompt[0] + '\n\nEnter verification code: ')
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}

生成以下错误:

^{pr2}$

有什么办法解决吗?在


Tags: importclientidsecretgoogledrivepromptheadless