Google日历Python API示例:在accounts.Google.com上找不到服务器



我最近一直在尝试使用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:Python27oauth2clientutil.py", line 128, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:Python27oauth2clienttools.py", line 197, in run
    credential = flow.step2_exchange(code, http=http)
  File "C:Python27oauth2clientutil.py", line 128, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:Python27oauth2clientclient.py", line 1283, in step2_exchange
    headers=headers)
  File "C:Python27httplib2__init__.py", line 1570, in request
    (response, content) = self._request(conn, authority, uri, request_uri, met
d, body, headers, redirections, cachekey)
  File "C:Python27httplib2__init__.py", line 1317, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body,
aders)
  File "C:Python27httplib2__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连接到互联网,并试图通过该连接连接到谷歌。不幸的是,它实际上并不起作用。尝试在您的计算机上禁用IPv6(Windows、Mac、Linux),看看这是否有帮助。

相关内容

  • 没有找到相关文章

最新更新