gpt4 book ai didi

python - google drive sdk quickstart python示例错误

转载 作者:行者123 更新时间:2023-11-28 16:47:06 26 4
gpt4 key购买 nike

我正在按照 Google Drive SDK ( https://developers.google.com/drive/quickstart#set_up_the_sample ) 的快速启动页面的示例 python 代码进行操作并收到错误

Traceback (most recent call last):
File "quickstart.py", line 45, in <module>
file = drive_service.files().insert(body=body, media_body=media_body).execute()
File "build/bdist.macosx-10.7-intel/egg/oauth2client/util.py", line 120, in positional_wrapper
File "build/bdist.macosx-10.7-intel/egg/apiclient/http.py", line 656, in execute
File "build/bdist.macosx-10.7-intel/egg/oauth2client/util.py", line 120, in positional_wrapper
File "build/bdist.macosx-10.7-intel/egg/apiclient/http.py", line 733, in next_chunk
apiclient.errors.ResumableUploadError: Failed to retrieve starting URI.

输入验证码后。这些步骤相当简单,所以我想知道示例代码是否已过时(尽管我没有看到其他人遇到此错误,所以它似乎与我的设置有关,但我不确定那会是什么)。感谢您的帮助。

最佳答案

扩展 papahoolio 的回答:

您需要确保该服务已启用,但有一个问题:同时存在“Drive SDK”“Drive API”服务,而且只有后者(“Drive API”)将起作用。但是,前者有漂亮的云端硬盘图标,如果您像我一样,就会对它产生狭隘的看法。

启用:

关于python - google drive sdk quickstart python示例错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12808521/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com