Authentication Error.

Aperta
#600 1 commento 3 reazioni 1 assegnatario Vedi su GitHub

@davidharcombe ci sta già lavorando.

Dal 6/1/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Summary

Followed the instructions on the site : https://developers.google.com/calendar/api/quickstart/python but got an error Authorized user info was not in the expected format, missing fields client_id, refresh_token, client_secret.

Expected Behavior

I'm using the Token generated via the Credentials / OAuth

Actual Behavior

File "C:\Users\mike\Documents\Work - Scripts\Google Calendar Invite Automation\test.py", line 63, in
main()
File "C:\Users\mike\Documents\Work - Scripts\Google Calendar Invite Automation\test.py", line 25, in main
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
File "C:\Users\mike\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\google\oauth2\credentials.py", line 440, in from_authorized_user_file
return cls.from_authorized_user_info(data, scopes)
File "C:\Users\mike\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\google\oauth2\credentials.py", line 390, in from_authorized_user_info
raise ValueError(
ValueError: Authorized user info was not in the expected format, missing fields client_id, refresh_token, client_secret.

Steps to Reproduce the Problem

Generate a new Oauth client id?

Specifications

  • PPython 3.10.9
  • OS - Windows 10 Pro 22H2
Lingua principale
Python
Stelle
1.4k
Fork
917
Merge medio
3m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di googleworkspace/python-samples

Tutte le issue di googleworkspace/python-samples

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.