iterative / iterative/PyDrive2

Getting a googleapiclient.http warning despite file being downloaded

Aperta
#143 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question triage
Lingua principale
Python
Stelle
670
Fork
75
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm using PyDrive2 v.1.10.0 on Mac to download google doc as docx but I keep getting the following warning even though the file gets downloaded anyway:
```
WARNING:googleapiclient.http:Encountered 403 Forbidden with reason "fileNotDownloadable"
```

Any idea how to silence that or prevent it from happening? Can someone explain why I am getting this warning?

Here is my code:
```
drive_files = drive.ListFile({'q': f"'{drive_id}' in parents and trashed=false"}).GetList()
for file in drive_files:
file.GetContentFile(file_path, mimetype='application/vnd.openxmlformats-officedocument.wordprocessingml.document')
```

_Note_: I get the same warning with `mimetype="application/pdf"` but not with `mimetype="application/zip"`

Thanks in advance!

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start at the shown GetContentFile call and compare the requests for DOCX, PDF, and ZIP mimetypes. Trace the googleapiclient.http warning for the 403 fileNotDownloadable response and determine why the download still succeeds. Done means the warning's cause and a supported way to prevent or silence it are documented or fixed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.