将代理凭据添加到Google日历连接

时间:2016-08-25 15:24:54

标签: python-3.x proxy google-calendar-api

我试图通过python从谷歌日历中获取事件,我使用google quickstart example,我打开浏览器确认凭据但在我的电脑上我得到以下错误:

Traceback (most recent call last):
  File "C:\Programs\Python\Python35-32\lib\site-packages\httplib2\__init__.py", line 987, in _conn_request
    conn.connect()
  File "C:\Programs\Python\Python35-32\lib\http\client.py", line 1252, in connect
    super().connect()
  File "C:\Programs\Python\Python35-32\lib\http\client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "C:\Programs\Python\Python35-32\lib\socket.py", line 693, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "C:\Programs\Python\Python35-32\lib\socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\myUser\Documents\Python_projects\quickstart.py", line 79, in <module>
    main()
  File "C:\Users\myUser\Documents\Python_projects\quickstart.py", line 60, in main
    credentials = get_credentials()
  File "C:\Users\myUser\Documents\Python_projects\quickstart.py", line 48, in get_credentials
    credentials = tools.run_flow(flow, store, flags)
  File "C:\Programs\Python\Python35-32\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Programs\Python\Python35-32\lib\site-packages\oauth2client\tools.py", line 243, in run_flow
    credential = flow.step2_exchange(code, http=http)
  File "C:\Programs\Python\Python35-32\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Programs\Python\Python35-32\lib\site-packages\oauth2client\client.py", line 2027, in step2_exchange
    headers=headers)
  File "C:\Programs\Python\Python35-32\lib\site-packages\httplib2\__init__.py", line 1314, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "C:\Programs\Python\Python35-32\lib\site-packages\httplib2\__init__.py", line 1064, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "C:\Programs\Python\Python35-32\lib\site-packages\httplib2\__init__.py", line 994, 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

我认为问题是由于我的代理,但我在哪里可以设置代理设置?

提前致谢

0 个答案:

没有答案