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
1
vote
0 answers

Google Drive API script not working for emails apart from my own email

Okay so I made script that requires some inputs, puts them together in a string then downloads user_info.txt file from my google drive and then it appends that string to that file and uploads it back to the google drive. It works on my machine like…
user11397474
1
vote
2 answers

Convert Google Sheet to PDF and store in same Google Drive folder as sheet

Set-up I have an empty Google Sheet invoice template in a folder. Using Python, Gspread and PyDrive I duplicate the template and populate the copy with data. Question Customers need to receive a pdf of the invoice, not a google sheet. I came…
LucSpan
  • 1,831
  • 6
  • 31
  • 66
1
vote
2 answers

Inserting permissions to Google Drive file using PyDrive

I am using PyDrive to create a Google Sheets file on a Google Shared Drive, the below code snippet successfully creates the file in my shared drive folder: f = gd.CreateFile( {'title': name, 'mimeType':…
Chris
  • 647
  • 1
  • 8
  • 32
1
vote
1 answer

InsufficientCredentials on google API

I'm trying to understand what is this error: File "C:\...\googleapiclient\http.py", line 856, in execute raise HttpError(resp, content, uri=self.uri) googleapiclient.errors.HttpError:
user12725052
1
vote
0 answers

Why does Google Drive API (pydrive) not work with shutil.move?

I have a simple Python Script that is designed to create a folder in the Windows directory, upload some files to Google Drive, and then move the files to the newly created folder and delete the original source file. Everything seemed to be working…
cwill_devs
  • 13
  • 4
1
vote
1 answer

pydrive: trying to upload files to Google Drive from a remote server

I am trying to upload files to google drive automatically with a python script working remotely from a (Ubuntu) server. In my code I have the following simple lines from Pydrive: from pydrive.auth import GoogleAuth from pydrive.drive import…
Berti1989
  • 185
  • 1
  • 14
1
vote
1 answer

How to access zip files from drive on Google collab?

I have dataset from https://www.kaggle.com/puneet6060/intel-image-classification that I have in my Google drive. These folders are zipped. Help needed with How do I access individual zip folders(seg_train.zip,seg_test.zip,seg_pred.zip) from the main…
user10089194
  • 339
  • 1
  • 5
  • 14
1
vote
1 answer

Get file like object from contents of GoogleDriveFile pydrive

Here are the docs: FetchContent(*args, **kwargs) Download file’s content from download_url. Raises: ApiRequestError, FileNotUploadedError, FileNotDownloadableError I tried supplying GoogleDriveFile.metadata['selfLInk'] and it didn't work....…
Edo Edo
  • 164
  • 2
  • 9
1
vote
2 answers

How to read all of the files in a specific directory in google drive using python?

I'm trying to go through all of the files in a folder to read and analyze them in python. There are a large number of these files and I would like to iterate through each file in the folder without having to hardcode the file names in. drive =…
Samhita
  • 13
  • 4
1
vote
1 answer

How to Load and Continue Training Model Saved as .H5 in Google Drive

I followed the following tutorial in Google Colab to create a text generating RNN: https://www.tensorflow.org/tutorials/sequences/text_generation Then, I trained it with my own data. At the end, I also added the following code to save it to my…
GoghDali
  • 21
  • 4
1
vote
0 answers

Uploading file in shared drive

Can anyone tell me how to put project id of shared drive in GoogleAuth()? I have tried the below chunk of code but none of them are working: auth = GoogleAuth({'id': 'projectid'}) auth = GoogleAuth({'project_id': 'projectid'}) auth =…
Sagnik
  • 1,446
  • 1
  • 9
  • 13
1
vote
0 answers

pydrive: why has this vertification error suddenly appeared?

I have a python script that downloads files from Google Drive using pydrive. This is the relevent bit of code: def get_drive_object(): gauth = GoogleAuth() gauth.LoadCredentialsFile("mycreds.txt") if gauth.credentials is…
Joe
  • 4,367
  • 7
  • 33
  • 52
1
vote
1 answer

Installing PyDrive on Mac

I'm trying to install PyDrive with a view to automating the back up of my work folder to google drive. I'm trying to use pip to install PyDrive in the terminal and having no such luck. When I run pip install PyDrive I get a syntax error, not sure…
1
vote
2 answers

Mount Google drive with Pydrive

I was using google colab and using this code to access my google drive: from google.colab import drive drive.mount('/content/gdrive') It works well but the authentification doesn't last long and I don't want to re-enter my credentials all the time.…
Sulli
  • 763
  • 1
  • 11
  • 33
1
vote
0 answers

InvalidConfigError: Invalid client secrets file while saving PyDrive credentials

I use a Colaboratory Notebook and tried to automate the GoogleAuth process while using PyDrive librairy. I tried the way dano proposed here: https://stackoverflow.com/a/24542604/10131744 Nevertheless, I get an error, linked to client secret. Here is…
Ticoincoin
  • 157
  • 1
  • 2
  • 15