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

Using Python to do basic Google Drive operations without web server authentication

I want to create a Python script that can do some really basic things (add/remove files in a shared google drive) The script will be running on remote PCs so anything involving web authentication is off the table I read online that using a service…
0
votes
0 answers

PyDrive "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup" despite logged in and authenticated

I have a bit of python code using PyDrive, to download files from a shared google drive folder. It looks like this. from pydrive2.auth import GoogleAuth from pydrive2.drive import GoogleDrive gauth = GoogleAuth() gauth.CommandLineAuth() drive =…
0
votes
0 answers

Pydrive: changing metadata for file on Shared Drive

I'm trying to make a script to process a lot of files on a Shared Drive using the wrapper PyDrive for Google Drive API. I can get the files loaded into a nested dictionary just fine, but when I try to change the metadata, the file (referenced by ID)…
Sandr
  • 11
  • 3
0
votes
1 answer

Setting can only see and prohibit download

I have a batch of files I know how to query files drive.ListFile({'q': "'id' in parents and trashed=false"}).GetList() Now I want to batch files Setting can only view and prohibit download But I don't know how to achieve
dudulu
  • 754
  • 6
  • 17
0
votes
1 answer

Uploading a video with a shareable link using Pydrive but it doesn't process

I'm trying to upload a video with a shareable link using Pydrive, but when I try to see the video using the link I get an error message: couldn't process the video. I've tried with a small size video (7MB) and using different formats, such as MP4,…
0
votes
2 answers

How to close a file so that it can be deleted with os.remove()? Getting WinError32

To begin, here's my code for my program: import os, shutil import keyboard from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive print("Zipping MedianXL SP save files to an archive...") shutil.make_archive("backup_saves",…
ajdbnabad13
  • 355
  • 3
  • 11
0
votes
0 answers

PYDRIVE: is it possible to update the description of a PNG file when you update metadata?

I have a dataframe with the the file Ids and the content I want to put in the description. I'm using pydrive and this code works fine for txt files but gives an error when I try to update the description of PNG files. Thanks! for ind in df.index: …
nandz123
  • 159
  • 12
0
votes
1 answer

Can't upload .mp4 files using PyDrive

I am trying to upload a .mp4 file to my Drive using the following code. file = drive.CreateFile({'title': "video", 'mimeType':'video/mp4'}) file.SetContentFile('GOPR1017.mp4') file.Upload() I end up getting this…
Bogdan Andrei
  • 75
  • 1
  • 10
0
votes
1 answer

Pydrive auth not working httplib.ResponseNotReady

I'm trying to send a file to a google drive with python but I'm stuck someway at the auth part. When I run the code below, the webpage from google open correctly, I can choose my account and it gives me the congratz message : "The authentication…
0
votes
1 answer

List all files in folder in shared Google Team Drive using PyDrive

I'm trying to use PyDrive to get a list of all file ids in a Google Drive Folder. My query works when I use it on a folder within my drive but doesn't work when I try to use it on a folder in a shared Google Team Drive. file_list =…
erb13020
  • 325
  • 1
  • 4
  • 7
0
votes
1 answer

'Method Not Allowed' when using pydrive to upload files to a shared folder in a shared Google Drive

I have a shared folder in a shared Google Drive https://gyazo.com/ae22a1d04eeddf9de49adbf470706ac8 I'm trying to upload a file to this team google drive using Pydrive. This code works for uploading to a specific folder in my drive but not in any of…
erb13020
  • 325
  • 1
  • 4
  • 7
0
votes
0 answers

Python: Download file from google drive when only you can access it

I want to download a file from google drive using python and just the id of the file. I have the ids and the files are not sharable by the links. Thus the access is restricted just to me. What is the way to download such a file. #downdrive.py from…
0
votes
1 answer

How to find the sub folder id in Google Drive using pydrive in Python?

The directory stricture on Google Drive is as follows: Inside mydrive/BTP/BTP-4 I need to get the folder ID for BTP-4 so that I can transfer a specific file from the folder. How do I do it? fileList = GoogleDrive(self.driveConn).ListFile({'q':…
hinata
  • 45
  • 1
  • 9
0
votes
0 answers

Increase query efficiency in pyDrive

I'm new to pyDrive (and Python in general). I'm working on a personal project and I ran into an efficiency problem. First, let me share you the code: def initializeCSV(ID): # Id starts off as 'root' and then goes from there folderNames = [] …
KraveXL
  • 305
  • 3
  • 12
0
votes
0 answers

download files from google drive via python

After searching in this site, I found that pydrive allows one to download files from google drive. But when I try this: from pydrive.auth import GoogleAuth I get a AttributeError: module googleapiclient has no attribute '__version__' and i…
turtle_in_mind
  • 986
  • 1
  • 18
  • 36