python - pandas read_gbq returns httplib.ResponseNotReady -
i using python google bigquery operations.
i have google bigquery project names data-wagon. created dataset 'vols' , table 'flights'.
this code i'm testing:
#import pandas pd
projectid = "data-wagon" data_frame = pd.read_gbq('select * vols.flights', project_id = projectid) print data_frame.head()
# when run eclipse, web page displayed ask authorization, click yes have error message:
your browser has been opened visit: https://accounts.google.com/o/oauth2/auth?scope=.................... if browser on different machine exit , re-run application command-line parameter --noauth_local_webserver traceback (most recent call last): file "c:\users\a452618\workspace\bigdatatutos\script_big_query.py", line 16, in <module> data_frame = pd.read_gbq('select * vols.flights', project_id = projectid) file "c:\python27\lib\site-packages\pandas\io\gbq.py", line 334, in read_gbq connector = gbqconnector(project_id, reauth = reauth) file "c:\python27\lib\site-packages\pandas\io\gbq.py", line 88, in __init__ self.credentials = self.get_credentials() file "c:\python27\lib\site-packages\pandas\io\gbq.py", line 111, in get_credentials credentials = run_flow(flow, storage, argparser.parse_args([])) file "c:\python27\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper return wrapped(*args, **kwargs) file "c:\python27\lib\site-packages\oauth2client\tools.py", line 225, in run_flow credential = flow.step2_exchange(code, http=http) file "c:\python27\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper return wrapped(*args, **kwargs) file "c:\python27\lib\site-packages\oauth2client\client.py", line 1982, in step2_exchange headers=headers) file "c:\python27\lib\site-packages\httplib2\__init__.py", line 1608, 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 1350, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) file "c:\python27\lib\site-packages\httplib2\__init__.py", line 1306, in _conn_request response = conn.getresponse() file "c:\python27\lib\httplib.py", line 1018, in getresponse raise responsenotready() httplib.responsenotready
could 1 me this?
best regards, ayoub
chances need to this or gcloud auth login.
Comments
Post a Comment