小编sov*_*ova的帖子

GCE Python API:oauth2client.util:execute()最多需要1个位置参数(给定2个)

我正在尝试使用https://developers.google.com/compute/docs/api/python_guide#setup上的"hello world"教程开始使用Google Compute Engine的Python API.

无论何时拨打电话response = request.execute(auth_http),我都会收到以下错误信号:我无法进行身份验证:

WARNING:oauth2client.util:execute() takes at most 1 positional argument (2 given)
Run Code Online (Sandbox Code Playgroud)

我显然只传递了一个位置参数(auth_http),我查看了oauth2client/util.py,apiclient/http.py和oauth2client/client.py以获得答案,但似乎没有任何问题.我发现另一个堆栈溢出帖子遇到了同样的问题,但似乎在oauth2client/client.py中的OAuth2WebServerFlow类的构造函数中,'access_type'已经设置为'offline'(虽然说实话我并不完全了解在设置oauth2.0流程方面发生了什么.

任何建议将不胜感激,并提前感谢!

oauth-2.0 google-compute-engine

6
推荐指数
2
解决办法
2023
查看次数

标签 统计

google-compute-engine ×1

oauth-2.0 ×1