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

Uploaded a File succesfully on google drive using Python with PyDrive but File is damaged

I am trying to upload a file from my computer to google drive using Python(Pydrive), it gets uploaded succesfully but gets damaged and its size becomes 0kb. Here is my code: drive = GoogleDrive(gauth) import glob, os with…
ankur singh
  • 72
  • 1
  • 7
2
votes
3 answers

pydrive how to read a file by id/title

I am using pydrive to read a file: file_list = drive.ListFile({'q': "'root' in parents and trashed=false"}).GetList() print(file_list) took = False for file1 in file_list: print('title: %s, id: %s' % (file1['title'], file1['id'])) And get list of…
Cranjis
  • 1,590
  • 8
  • 31
  • 64
2
votes
1 answer

ApiRequestError when using pydrive in Google Colab

Lately when using pydrive from Google Collab like this !pip install -U -q PyDrive import os from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from google.colab import auth from oauth2client.client import GoogleCredentials #…
UpmostScarab
  • 960
  • 10
  • 29
2
votes
0 answers

Use PyDrive to append data to a file

I'm working on a Python application which is supposed to log different types of entries. The log file's format is JSON Lines http://jsonlines.org/. If the script detects a Wi-Fi connection, it updates the file, uploading it using PyDrive (all the…
Maganna Dev
  • 189
  • 1
  • 11
2
votes
1 answer

Python google drive file download without specifying destination filename

I am trying to download a file from google drive with file ID and then place the file in my local folder. Download works fine but my problem is that when I try to specify the folder and file name, I can specify the filename manually, but not…
Hossain
  • 235
  • 1
  • 3
  • 15
2
votes
0 answers

Python script to auto update files from Google Drive

I want to use python script to find an updated file from google drive. For example, I have a file in local folder called setup.v.1.2.5 and I want to look for setup.v.1.2.6. Whenever the newer version is available, I can download that file like auto…
Hossain
  • 235
  • 1
  • 3
  • 15
2
votes
1 answer

Using Pydrive to query the files by modifiedTime

i am using pydrive that trying to query the files from the date that i created. here is my sample code: for f in drive.ListFile({'q':"modifiedTime > '2012-06-04T12:00:00-08:00'"}): for f1 in f: print(f1['title']+' '+f1['id']) but…
2
votes
1 answer

Google drive multythreading move files PYTHON

Sorry fro my englihs. I use pyDryve for google drive api. And i want move files from one folder to another, use for this multythreading. pool = ThreadPoolExecutor(max_workers=2) # i have list of file for file in date_val: …
nesalexy
  • 848
  • 2
  • 9
  • 30
2
votes
1 answer

Pydrive can't open .csv file : No downloadLink/exportLinks for mimetype found in metadata

I just starting using Google Colab and it looks really promising (free GPU yes please!), but I haven't been able to even import data from my drive. I followed the tutorial for using Pydrive but keep getting the error FileNotDownloadableError: No…
Meme Overlord
  • 997
  • 1
  • 9
  • 16
2
votes
3 answers

Download file google drive python

How do I download a file from googledrive? I am using pydrive using the link. #https://drive.google.com/open?id=DWADADDSASWADSCDAW from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() drive =…
user8900239
2
votes
1 answer

File permissions not changing using PyDrive metadata

I hope someone can help. I'm using PyDrive to authenticate and upload a file to my Google Drive with no problems. Then I try to change permissions of same file to allow sharing by updating its metadata. drive = GoogleDrive(gauth) file1 =…
mkatsu
  • 21
  • 3
2
votes
2 answers

pydrive library for google drive is not downloading file in requested format using requests

I have a simple script set up for getting a file off my google drive account and updating it. I have no problems authenticating and getting access to the drive. The file is in the form of a google spreadsheet on the drive. Thus, when I have the…
themantalope
  • 1,040
  • 11
  • 42
2
votes
2 answers

Deleting a File via PyDrive

I'm using PyDrive (http://pythonhosted.org/PyDrive/) to simplify API access to the Google Drive, but have hit a stumbling block when attempting to delete an existing file from Drive. I saw no clear way from the documentation or from a brief skim of…
Pike
  • 119
  • 2
  • 7
1
vote
1 answer

Connecting to google drive from python in a github action

I'm trying to create a github action that runs a python script that has access to google drive. I use OIDC to auth to google drive in the github action, but I'm banging my head against a wall trying to figure out how to connect to google in the…
Thaqor
  • 49
  • 7
1
vote
1 answer

Pydrive : Error opening file', 'client_secrets.json

i'm trying to connecting Pydrive to my Python Project but I got this Traceback (most recent call last): File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauth2client\clientsecrets.py", line 121, in _loadfile with…
Shi0oo
  • 11
  • 1