iterative / iterative/PyDrive2
Getting a googleapiclient.http warning despite file being downloaded
- Vorherrschende Sprache
- Python
- Sterne
- 670
- Forks
- 75
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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!
Beitragsleitfaden
Rechercherichtung
Beginnen Sie beim gezeigten GetContentFile-Aufruf und vergleichen Sie die Anfragen für die DOCX-, PDF- und ZIP-Mimetypes. Verfolgen Sie die googleapiclient.http-Warnung für die 403-fileNotDownloadable-Antwort zurück und ermitteln Sie, warum der Download trotzdem erfolgreich ist. Als erledigt gilt die Aufgabe, wenn die Ursache der Warnung und eine unterstützte Möglichkeit, sie zu verhindern oder zu unterdrücken, dokumentiert oder behoben sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100