在我的本地PC连接到Google Big Query时出现套接字错误

时间:2017-08-18 13:30:09

标签: google-bigquery google-cloud-platform

我工作正常,在过去两天内运行以下步骤连接到PC中pycharm中的Big查询

step 1:gcloud auth application-default login  
step 2 :then connect to BG in the Pycharm in my local PC.

然而,当我今天使用相同的方法尝试时: 发生以下错误:

因为我落后"长城"在中国,所以只能使用VPN登录谷歌云,所以我不确定它是由VPN引起的还是与谷歌帐户的设置有关?但是,我尝试使用" service-account-key",它碰巧是同一个问题日志:

Traceback (most recent call last):
  File "C:/Users/emma/PycharmProjects/GCP/INIT.py", line 134, in <module>
    explicit()
  File "C:/Users/emma/PycharmProjects/GCP/INIT.py", line 54, in explicit
    for dataset in bigquery_client.list_datasets():
  File "C:\Python27\lib\site-packages\google\cloud\iterator.py", line 218, in _items_iter
    for page in self._page_iter(increment=False):
  File "C:\Python27\lib\site-packages\google\cloud\iterator.py", line 247, in _page_iter
    page = self._next_page()
  File "C:\Python27\lib\site-packages\google\cloud\iterator.py", line 347, in _next_page
    response = self._get_next_page_response()
  File "C:\Python27\lib\site-packages\google\cloud\iterator.py", line 396, in _get_next_page_response
    query_params=params)
  File "C:\Python27\lib\site-packages\google\cloud\_http.py", line 299, in api_request
    headers=headers, target_object=_target_object)
  File "C:\Python27\lib\site-packages\google\cloud\_http.py", line 193, in _make_request
    return self._do_request(method, url, headers, data, target_object)
  File "C:\Python27\lib\site-packages\google\cloud\_http.py", line 223, in _do_request
    body=data)
  File "C:\Python27\lib\site-packages\google_auth_httplib2.py", line 187, in request
    self._request, method, uri, request_headers)
  File "C:\Python27\lib\site-packages\google\auth\credentials.py", line 121, in before_request
    self.refresh(request)
  File "C:\Python27\lib\site-packages\google\oauth2\service_account.py", line 310, in refresh
    request, self._token_uri, assertion)
  File "C:\Python27\lib\site-packages\google\oauth2\_client.py", line 143, in jwt_grant
    response_data = _token_endpoint_request(request, token_uri, body)
  File "C:\Python27\lib\site-packages\google\oauth2\_client.py", line 104, in _token_endpoint_request
    method='POST', url=token_uri, headers=headers, body=body)
  File "C:\Python27\lib\site-packages\google_auth_httplib2.py", line 116, in __call__
    url, method=method, body=body, headers=headers, **kwargs)
  File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1609, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1351, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1272, in _conn_request
    conn.connect()
  File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 1075, in connect
    raise socket.error, msg
socket.error: [Errno 10060] 

1 个答案:

答案 0 :(得分:0)

我更新了python-cloud库,然后一切正常。 希望它能一直保持:(