Timeout error when trying to connect to the gmail api
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- api, networking
Rechercherichtung
The failure happens in quickstart.py at the build('gmail', 'v1', credentials=creds) call, which fetches the discovery document inside googleapiclient's _retrieve_discovery_doc before any token is written. Start by running the quickstart on a machine with a known-good network path to confirm whether the timeout reproduces, then check whether the discovery URL is reachable. Done means either a reproducible cause is documented, or the sample gets a clearer error or retry path. The thread has no maintainer reply, so confirm the scope with a maintainer first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Expected Behavior
quickstart.py should work as intended, showing the user's labels as queried from the user's gmail account.
Actual Behavior
timeout error before creating the token.pickle file:
Traceback (most recent call last):
File "quickstart.py", line 48, in <module>
main()
File "quickstart.py", line 34, in main
service = build('gmail', 'v1', credentials=creds)
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/googleapiclient/discovery.py", line 224, in build
requested_url, discovery_http, cache_discovery, cache, developerKey)
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/googleapiclient/discovery.py", line 274, in _retrieve_discovery_doc
resp, content = http.request(actual_url)
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/httplib2/__init__.py", line 1994, in request
cachekey,
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/httplib2/__init__.py", line 1651, in _request
conn, request_uri, method, body, headers
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/httplib2/__init__.py", line 1557, in _conn_request
conn.connect()
File "/home/my_username/.pyenv/versions/3.6.4/lib/python3.6/site-packages/httplib2/__init__.py", line 1324, in connect
sock.connect((self.host, self.port))
socket.timeout: timed out
I tried with both of my system's python versions as well (2.7.17, 3.7.6), same error. I have reasons to believe it's something about my system, since it happens for three different python versions, I tested Java's quickstart code with the same credentials and it worked as expected, and python's version was working until last week, but don't know where to look to fix it, so, any help will be appreciated.
Steps to Reproduce the Problem
- Create a virtual env with python 3.6.4.
- Run
python quickstart.py
Specifications
- Python version (
python --version) 2.7.17, 3.6.4, 3.7.6 - OS (Mac/Linux/Windows) Linux Fedora 30
- Vorherrschende Sprache
- Python
- Sterne
- 1.4k
- Forks
- 917
- Ø Merge
- 3 Min.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus googleworkspace/python-samples
-
ايقاف البحث الأمنEvtl. wieder frei @sqrrrl hat das vor 400 Tagen übernommen, und es ist kein Pull Request offen. Offen
googleworkspace/python-samples#2434 · 1 zugewiesene Person ·
-
Slow Uploads using Google Drive API with PythonEvtl. wieder frei @sqrrrl hat das vor 740 Tagen übernommen, und es ist kein Pull Request offen. Offen
googleworkspace/python-samples#1852 · 1 Kommentar · 1 zugewiesene Person ·
-
403 error from google after a few successful runs of my codeEvtl. wieder frei @vinay-google hat das vor 912 Tagen übernommen, und es ist kein Pull Request offen. Offen
googleworkspace/python-samples#1424 · 1 zugewiesene Person ·
-
How to see the progress of files which is getting uploadedEvtl. wieder frei @vinay-google hat das vor 928 Tagen übernommen, und es ist kein Pull Request offen. Offen
googleworkspace/python-samples#1404 · 1 zugewiesene Person ·
-
Phyton SamplesEvtl. wieder frei @PierrickVoulet hat das vor 975 Tagen übernommen, und es ist kein Pull Request offen. Offen
googleworkspace/python-samples#1279 · 1 zugewiesene Person ·
Alle Issues in googleworkspace/python-samples
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
canonical/paas-charm#407 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement tooling
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
`read_nexus` entry point points to a function that no longer existsEvtl. vergeben @RubelMozumder hat das heute übernommen. Offenannotator bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
FAIRmat-NFDI/pynxtools#876 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingEvtl. vergeben @yipinghuang1991 hat das heute übernommen. Offencomp/agent P2 type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
NousResearch/hermes-agent#156837 ·
Maintainer antworten meist innerhalb von 1 Tag