IOError: [Errno 13] Permission denied: 'token.pickle'
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- authentication
Direzione di ricerca
The failure is in quickstart.py at the open('token.pickle', 'wb') call inside main(), reached after the OAuth browser flow completes. Check whether the script's working directory is writable, since the reporter installed packages with sudo and the file may be owned by root. The fix should either make the sample write the token somewhere it can write or document the directory requirement, and a run that saves token.pickle without the error shows it is done.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Expected Behavior
to print either:
print('No data found.')
else:
print('Name, Major:')
Actual Behavior
Opening in existing browser session.
Traceback (most recent call last):
File "quickstart.py", line 55, in <module>
main()
File "quickstart.py", line 35, in main
with open('token.pickle', 'wb') as token:
IOError: [Errno 13] Permission denied: 'token.pickle'
Steps to Reproduce the Problem
Following quickstart.py example:
https://developers.google.com/sheets/api/quickstart/python#troubleshooting
- created a new google sheet and save file
- clicked enable the Google Sheet API set up with default setting: desktop app - downloaded .json file and stored in the same folder as the quickstart.py
- ran 'sudo pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib'
Found existing installation: google-auth-httplib2 0.0.3
Uninstalling google-auth-httplib2-0.0.3:
Successfully uninstalled google-auth-httplib2-0.0.3
Found existing installation: google-api-python-client 1.7.9
Uninstalling google-api-python-client-1.7.9:
Successfully uninstalled google-api-python-client-1.7.9
Found existing installation: google-auth-oauthlib 0.4.0
Uninstalling google-auth-oauthlib-0.4.0:
Successfully uninstalled google-auth-oauthlib-0.4.0
Successfully installed google-api-python-client-1.10.0 google-auth-httplib2-0.0.4 google-auth-oauthlib-0.4.1
- changed quickstart.py Sheet ID to match that of my sheet I had set up
- run 'python quickstart.py'
- pops up a window to authorise
- choose user and click authorise
- returned to screen and throws the error:
Traceback (most recent call last):
File "quickstart.py", line 55, in <module>
main()
File "quickstart.py", line 35, in main
with open('token.pickle', 'wb') as token:
IOError: [Errno 13] Permission denied: 'token.pickle'
Specifications
- Python version (
Python 2.7.16) - OS:
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
- Lingua principale
- Python
- Stelle
- 1.4k
- Fork
- 917
- Merge medio
- 3m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di googleworkspace/python-samples
-
ايقاف البحث الأمنForse di nuovo libera @sqrrrl l’ha presa 400 giorni fa e non c’è nessuna pull request aperta. Aperta
googleworkspace/python-samples#2434 · 1 assegnatario ·
-
Slow Uploads using Google Drive API with PythonForse di nuovo libera @sqrrrl l’ha presa 740 giorni fa e non c’è nessuna pull request aperta. Aperta
googleworkspace/python-samples#1852 · 1 commento · 1 assegnatario ·
-
403 error from google after a few successful runs of my codeForse di nuovo libera @vinay-google l’ha presa 912 giorni fa e non c’è nessuna pull request aperta. Aperta
googleworkspace/python-samples#1424 · 1 assegnatario ·
-
How to see the progress of files which is getting uploadedForse di nuovo libera @vinay-google l’ha presa 928 giorni fa e non c’è nessuna pull request aperta. Aperta
googleworkspace/python-samples#1404 · 1 assegnatario ·
-
Phyton SamplesForse di nuovo libera @PierrickVoulet l’ha presa 975 giorni fa e non c’è nessuna pull request aperta. Aperta
googleworkspace/python-samples#1279 · 1 assegnatario ·
Tutte le issue di googleworkspace/python-samples
Issue simili
-
[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 retryingForse già presa @yipinghuang1991 l’ha presa oggi. Apertacomp/agent P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#156837 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
fedora-infra/anitya#2188 ·
I maintainer di solito rispondono entro 1 giorno
-
docs documentation need-triage SaaS
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
integration:hermes
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
vectorize-io/hindsight#6601 ·
I maintainer di solito rispondono entro 1 giorno
-
triage:product type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
dbt-labs/dbt-adapters#2333 ·
I maintainer di solito rispondono entro 1 giorno