gpt4 book ai didi

python - Google 日历 Python API 示例 : unable to find the server at accounts. google.com

转载 作者:行者123 更新时间:2023-11-28 16:41:57 25 4
gpt4 key购买 nike

我最近一直在尝试使用Python访问Google Calendar API,所以我下载了示例程序,通过命令行运行,在浏览器中接受身份验证后出现了这个错误:

  Traceback (most recent call last):
File "sample.py", line 133, in <module>
main(sys.argv)
File "sample.py", line 102, in main
credentials = run(FLOW, storage)
File "C:\Python27\oauth2client\util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\oauth2client\tools.py", line 197, in run
credential = flow.step2_exchange(code, http=http)
File "C:\Python27\oauth2client\util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\oauth2client\client.py", line 1283, in step2_exchange
headers=headers)
File "C:\Python27\httplib2\__init__.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, met
d, body, headers, redirections, cachekey)
File "C:\Python27\httplib2\__init__.py", line 1317, in _request
(response, content) = self._conn_request(conn, request_uri, method, body,
aders)
File "C:\Python27\httplib2\__init__.py", line 1258, in _conn_request
raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at accounts.google.com

有人知道为什么会这样吗?

最佳答案

听起来您的计算机认为它有 IPv6 连接到互联网,并试图通过该连接连接到 Google。不幸的是它实际上不起作用。尝试在您的计算机上禁用 IPv6(WindowsMacLinux),看看是否有帮助。

关于python - Google 日历 Python API 示例 : unable to find the server at accounts. google.com,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18429927/

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