-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Environment details
- OS: mac 10.14.2
- Python version: 3.8.0
- pip version: 19.3.1
google-api-python-client
version: 1.7.11
Steps to reproduce
- follow https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/search_analytics.html
- python3 search_analytics_api_sample.py 'https://www.aliexpress.com' '2019-12-01' '2019-12-03' appear the question ,as follow:
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?client_id=203217488720-kmuf8umncn0jftrcgtd2bu9s4suiae58.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters.readonly&access_type=offline&response_type=code
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver
Traceback (most recent call last):
File "search_analytics_api_sample.py", line 198, in
main(sys.argv)
File "search_analytics_api_sample.py", line 57, in main
service, flags = sample_tools.init(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/googleapiclient/sample_tools.py", line 93, in init
credentials = tools.run_flow(flow, storage, flags)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/oauth2client/tools.py", line 243, in run_flow
credential = flow.step2_exchange(code, http=http)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/oauth2client/client.py", line 2053, in step2_exchange
resp, content = transport.request(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/oauth2client/transport.py", line 280, in request
return http_callable(uri, method=method, body=body, headers=headers,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/httplib2/init.py", line 1948, in request
(response, content) = self._request(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/httplib2/init.py", line 1621, in _request
(response, content) = self._conn_request(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/httplib2/init.py", line 1528, in _conn_request
conn.connect()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/httplib2/init.py", line 1376, in connect
raise socket_err
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/httplib2/init.py", line 1309, in connect
sock.connect((self.host, self.port))
TimeoutError: [Errno 60] Operation timed out
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!