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
0
votes
1 answer

Get shareable link of Google Drive files in a specific folder

I've been trying to apply the solution described here, adapting from the PyDrive documentation. What I want is to work on files in a specific folder, not get a list of all files in my Drive (which contains thousands). So I've tried: files =…
mrgou
  • 1,576
  • 2
  • 21
  • 45
0
votes
1 answer

socks.py argument should be integer or bytes-like object, not 'str'

i'm using pydrive on a remote server (pythonanywhere), when i run the code it asks for verification code, and when i provide the code i get the following error Go to the following link in your…
0
votes
1 answer

How can I download files from team drives?

I'd like to periodically download and upload a file from a shared teams drive on google drive. I can upload to the folder, but not download. This is what I've tried team_drive_id = 'YYY' file_to_download= 'ZZZ' parent_folder_id = 'XXX' f =…
Alex
  • 169
  • 1
  • 1
  • 8
0
votes
0 answers

How can I upload a folder to google drive using pydrive?

f = drive.CreateFile({"parents": [{"kind": "linktodrive", "id": fid}]}) f.SetContentFile('traffic_measurement'+str(y)+'.csv') f1 = drive.CreateFile({"parents": [{"kind": "linktodrive", "id":…
0
votes
1 answer

Google colab unable to authenticate google drive using PyDrive

I'm running a code on Google colab and I ran into an authentication problem when I mount my google drive. I didn't have any authentication or mounting problem until now, but it stopped working all of a sudden. I don't recall any changes I made to my…
0
votes
1 answer

How to read files in multiple folders under Shared Google Drive?

Is it possible to get files inside Google Shared Drive? PyDrive is able to iterate over files in MyDrive but not Shared Drive. The files are inside multiple folders: Department -> PDF -> MONTH YEAR -> DATE -> DAILY REPORT.pdf Codes tried but both…
MarthaF
  • 187
  • 2
  • 17
0
votes
0 answers

Python (PyDrive) - Uploading PDF to Google Drive Throwing UnicodeDecodeError

I'm trying to automate uploading receipt pdfs to google drive, but I'm running into trouble just uploading the pdf in question. '''ALREADY IMPORTED AND AUTHENTICATED''' os.chdir('C:\\Users\\sophi\\.spyder-py3-dev\\FishtagScripts') for file in…
0
votes
1 answer

Google Drive API Invalid Secrets File Through Task Scheduler

I need some help troubleshooting something that should be easy to figure out. I have the following files in this folder on my computer: C:\Users\theda\Documents\Python\CANSLIM…
Nick Nelson
  • 1,131
  • 2
  • 18
  • 36
0
votes
0 answers

Is it possible to authenticate to a different Google Drive user in PyDrive?

I connected to my Google Drive using this code !pip install -U -q PyDrive from google.colab import files from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from google.colab import auth from oauth2client.client import…
0
votes
0 answers

When asking for authorization to access the drive, all works well except it just doesn't redirect

I'm using pydrive to upload a pdf file to a google drive, all is working super well, except there's one very unpleasant issue. When I click in allow, all works well in the background, but it just doesn't redirect anywhere. If I click again, it…
0
votes
0 answers

Is it safe to store json credentials file in Heroku project?

I am not hosting the project on git or anything like that. I'm trying to use Pydrive and it is not letting me load service account credentials from Heroku environment variables. If I put the json credentials file with my project, is there any chance…
24hourbreakfast
  • 185
  • 1
  • 2
  • 11
0
votes
2 answers

How to properly import data from Google Drive to Google Colab Notebook?

I know this is very simple, but I need some directions. I have a Jupyter Notebook that I used to run on my local Linux machine. The notebook has some deep learning training code that imports dataset, processing and training and stuff. In my local…
0
votes
1 answer

upload file to google drive using cron executed python

I successfully uploaded the file to google drive as follows https://pythonhosted.org/PyDrive/quickstart.html, https://pythonhosted.org/PyDrive/oauth.html#automatic-and-custom-authentication-with-settings-yaml however, cron job couldn't make upload…
0
votes
1 answer

Reading images from google drive, process them and train a CNN model with them on the fly

I am a bit new to Colab and Keras. I want to work on images that are of very large size (each image of 5 gb), available on google drive. Can I read those images directly from google drive, process them on the fly and train a model with those images…
0
votes
1 answer

Downloading files in Google Drive folder to Local C-Drive through Python

I am trying to download a .csv file that populates to a Google Drive Folder through the process of Microsoft Flow that retrieves an email attachment document every 6 hours through email. I attempted to follow the documentation of using the Pydrive…