iterative / PyDrive2

Google Drive API Python wrapper library. Maintained fork of PyDrive.
https://docs.iterative.ai/PyDrive2
Other
570 stars 70 forks source link

FileNotUploadedError #278

Closed Rootzi closed 1 year ago

Rootzi commented 1 year ago

image returns pydrive2\files.py", line 468, in FetchMetadata raise FileNotUploadedError() pydrive2.files.FileNotUploadedError

I am absolutely certain that the content = highScoresFile.GetContentString() is the cause of the problem as without it, the error no longer appears. I have attempted to replace that line with content = highScoresFile.GetContentFile('highscores.txt') but to no avail. That revised approach returns the following: pydrive2\files.py", line 320, in GetContentFile raise FileNotUploadedError() pydrive2.files.FileNotUploadedError

If anybody is aware of a solution or workaround, I would be very grateful if you might be able to shed some light.

shcheklein commented 1 year ago

You need an to provide an id to the library to find the file (title is not enough). Either you know this id from one the previous calls (when you created the file), can get it from the UI (URL contains it), or you can run a list command to search by title I think.

Rootzi commented 1 year ago

i love you brother