Unicode error in quickstart

Offen
#137 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
15/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
authentication

Rechercherichtung

The failing call is flow.run_local_server(port=0) in the quickstart's OAuth sample, which reads the downloaded credentials.json. Start by checking whether the byte 0xcf in the report means the file was read as binary-corrupted text, and reproduce with a freshly downloaded file on Python 3.7 on Windows. Done means either the sample handles the file correctly or it fails with a clear message that points to the cause.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

question

Copied and pasted the code. Downloaded credentials.json. Replaced all spaces to tabs and after all got Unicode error in this line :

 creds = flow.run_local_server(port=0)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 6: invalid continuation byte

I really don't know what the problem. Httplib2 was upgraded (ver. 0.15.0) like others libs which would be needed.

httplib2 0.15.0
python 3.7.4
Windows OS

Vorherrschende Sprache
Python
Sterne
1.4k
Forks
917
Ø Merge
3 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus googleworkspace/python-samples

Alle Issues in googleworkspace/python-samples

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.