Questions tagged [pydrive]

PyDrive is a wrapper library of google-api-python-client that simplifies many common Google Drive API tasks.

PyDrive is a wrapper library of google-api-python-client that simplifies many common Google Drive API tasks.

269 questions
4
votes
1 answer

Programmatically access Google Drive with Python

Is there a way to programmatically access a Google Drive folder without having to manually authenticate with OAuth for every session? I've used PyDrive and managed to access the drive, but I still have to go through the manual browser OAuth access…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
3
votes
1 answer

How to avoid auth page using google drive api with pydrive

I`m automating uploading files to google drive using pydrive. I`m trying to avoid the authentication page that shows google every time i authenticate with the api. I`ve read some blogs about it but I dont get anything clear.
Nat
  • 77
  • 8
3
votes
1 answer

Uploading image string to Google Drive using pydrive

I need to upload an image string (as the one you get from requests.get(url).content) to google drive using the PyDrive package. I checked a similar question but the answer accepted there was to save it in a temporary file on a local drive and then…
pu239
  • 707
  • 7
  • 17
3
votes
1 answer

PyDrive Quickstart and Error 403: access_denied

I am trying to download google drive photo to my local drive. I thought this should be an easy task but it is practically challenging especially that it is my first time trying to use google API. Following all the steps in this helpful Youtube video…
rsc05
  • 3,626
  • 2
  • 36
  • 57
3
votes
1 answer

Download file from google share drive using pydrive, file exist, but API return 404 File not found error

I am using python to fetch files from the google shared drive, which is owned by the team. The currently issue is I can parse all the file ID's but I cannot using the pyDrive to download or read the content of the file. First I generated a…
Bill Chen
  • 1,699
  • 14
  • 24
3
votes
0 answers

How to access google drive data when using google-colab in local runtime?

I have tried using PyDrive to authenticate and get access of Google Drive. I followed every step in here, https://pythonhosted.org/PyDrive/quickstart.html. After downloading and renaming “client_secrets.json”, where should I put or use this file in…
Stella
  • 31
  • 1
3
votes
1 answer

How to replace/update a file on Google Drive with PyDrive?

My application needs to upload some files daily, updating those that already exist. I know that if I pass the ID of existing files, they will be updated, but I was wondering if there's some more clever solution for this. def upload_file(path,…
3
votes
5 answers

Reauthenticate or Remove authentication Pydrive during runtime in Google Colab

I want to reauthenticate my Google Drive Credentials so that I can login from a different Google account and access it using pydrive. How can I do that? I am using the following code to authenticate: auth.authenticate_user() gauth =…
3
votes
1 answer

PyDrive get only my files and shared with me files. Python

Sorry for my english. I use pydrive for work whith google drive api. I want get list of files. I do it like this: return self.g_drive.ListFile({'q': 'trashed=false'}).GetList() this return me list of files. But it list contains delete files. I…
nesalexy
  • 848
  • 2
  • 9
  • 30
3
votes
1 answer

Python in Buildroot - PyDrive errors

I am attempting to use an application in my buildroot target which uses PyDrive. I am receiving the following errors: # python driveapp.py ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File…
dswift
  • 71
  • 1
  • 3
3
votes
1 answer

Adding Python package to Buildroot

I am running an embedded system on Buildroot. I want to run a Python application on it which requires the PyDrive module. I am getting a PYTHONPATH error which looks like: TEST FAILED:…
dswift
  • 71
  • 1
  • 3
3
votes
2 answers

Python: Get zip file from Google Drive API and load its content

I have a zipfile on my Google Drive. In that zipfile is a XML file, which I want to parse, extract a specific information and save this information on my local computer (or wherever). My goal is to use Python & Google Drive API (with help of…
3
votes
2 answers

Upload a huge file to Google Drive using PyDrive

Currently, I am using PyDrive to upload my backup (.tar file) to google drive. Is there a special thing to do with this library to upload a huge file to Google Drive (around 5gb). In the Google Drive API documentation, it says that we must use the…
Etienne Noël
  • 5,988
  • 6
  • 48
  • 75
3
votes
1 answer

Update a file with convert to Google driver with pydrive Gives: ApiRequestError: HttpError 500 Error

I am trying to update an existing file in Google drive using python script. The code that I am using is: fileID = wasFileUploadedBefore(drive, reportName) #this gets the fileID if it's already in GDrive if fileID != 0: reportFile =…
Alex
  • 81
  • 5
2
votes
1 answer

Why does PyDrive stop refreshing the access token after a while?

I'm using PyDrive to regularly upload something to my Drive (every ~15 minutes or so), but after a while (I haven't checked exactly, I believe it's a week or two) it stops uploading anything, yielding instead this error…