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

Unable to access a functionality in a .exe that uses pydrive library

So I have a GUI.py file with functionality mapped to a button that when clicked, uploads files stored in a particular folder to google drive. The script works fine when I run it using vscode, but it won't work when using the same in the executable…
1
vote
3 answers

Overwrite an Excel file in Google Drive using Python

I have a loop which runs through a list of files then uploads them a Google Drive folder. There is a client_secrets.json file in the folder on my computer. I am able to create new files in the Google Drive folder but I wish to overwrite the existing…
Sanch
  • 367
  • 2
  • 11
1
vote
1 answer

How to fix 'tuple' object has no attribute 'open'?

Im parsing data for study purposes so I create scraping module, data frame module and now I need to finish "upload to Google Drive data frame as Google Sheet" but stuck on this error. from fileinput import filename import gspread credentials =…
MasterMind
  • 97
  • 7
1
vote
1 answer

How to set folder path when downloading from google drive

I am trying to download some files from a google drive folder to local folder /home/lungsang/Desktop/gdrive/ABC. Can you guys can modify the below code so that I can achieve it? PS: Right now its just downloading in the root folder :) import…
lungsang
  • 133
  • 13
1
vote
1 answer

TypeError: GoogleAuth.LocalWebserverAuth() missing 1 required positional argument: 'self'

I am trying to authenticate google api and after following all the necessary steps like making credentials and installing pydrive, I am faced with this error when running the main.py module TypeError: GoogleAuth.LocalWebserverAuth() missing 1…
1
vote
0 answers

How to automatically generate nested dictionary rather than manual update of keys?

I am using DevExtreme's File Manager and I want to add data from my google drive. Below is the structure for File Managers' files data: [ { "name": "Documents", "isDirectory": true, "items": [ { "name":…
Meet Gondaliya
  • 387
  • 4
  • 18
1
vote
0 answers

Python: split a video based on file size for streaming

I'm trying to figure out how to stream a video where the video is uploaded to google drive in pieces and downloaded in pieces for streaming. How do I split the video into a file sizes of my choice before uploading? Any module is fine as long as it's…
AzlanCoding
  • 209
  • 2
  • 11
1
vote
1 answer

Has anyone had this issue when using a proxy within Google Drive/PyDrive upload function?

I've got code that I will run on a remote server that uploads files to Google Drive and returns a shareable link. This all works perfectly locally. The issue I am having is when I attempt to use a proxy. GoogleAuth seems to be working fine with the…
user16545584
1
vote
1 answer

Change the Privacy Status of a file using Google Drive Api and Python

How do I change the privacy status of a file using Google Drive Api and Python? I can capture this state with file['shared'] which returns a boolean 0 (private) or 1 (public)
Tobias
  • 13
  • 2
1
vote
1 answer

Is it possible to sync or upload the file from google drive without copying the whole thing in the folder using python?

I just start learning the python scripting and I created a script using pydrive and the function is uploading all files from local folder (linux OS) to google drive but I'm planning to modify the script for my automation and add the function that…
rodskies
  • 119
  • 1
  • 11
1
vote
1 answer

With pydrive, sendNotificationEmails = False not working

We are already successfully authenticated. We have the following python function using PyDrive: def upload_to_drive(local_filepath): gfile = drive.CreateFile({'parents': [{'id': '123ourdrivefolderid456'}]}) …
Canovice
  • 9,012
  • 22
  • 93
  • 211
1
vote
1 answer

Implement access token from OAUTH playground google with pydrive

I was trying to authenticate without asking for permissions on google drive using pydrive and they suggest me to follow this answer answer on stack but when I got the access token I didn`t really know where to place it, I tried on…
Nat
  • 77
  • 8
1
vote
0 answers

PyDrive script not working after changing accounts

I've been working on a Twitter app with a friend that pulls its content from a Google Drive folder, then moves the files to a different folder when it's done. I had everything working perfectly until I decided to try to update which Google account…
mortypie
  • 11
  • 2
1
vote
0 answers

Hiding client_secrets.json file from PyDrive (python3)

I'm trying to create a python program that accesses the Google Drive API using PyDrive. However, one quirk of PyDrive is that it need a client_secrets.json file for OAuth2. Is there any way for me to hide the file so that the user is not able to…
1
vote
1 answer

How Google Drive API updates Sep 13, 2021 affect authenticate with pydrive

Like a lot of users, I just got this mail, of google drive security updates. I'm currently using Pydrive with python to send files from PC to google drive, for that I've got an API key and created a credentials file, and saved it for automatic…
Alon8200
  • 151
  • 1
  • 2
  • 8