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
2 answers

Invalid Query, Drive api, files.list()

this functions: drive.ListFile({'q': " id = '"+Value+"' and trashed=false"}).GetList() return: "Invalid query" The problem lies in the selector 'id', if I raise this condition I return a dictionary with the parameter 'id' I am used this doc,…
simone989
  • 397
  • 1
  • 3
  • 8
1
vote
1 answer

cannot import name 'CredentialsFileSymbolicLinkError'

I install pydrive using pip3 with --user. When trying to run an example script, I get the following error: $ python3 quick.py Traceback (most recent call last): File "quick.py", line 1, in from pydrive.drive import GoogleAuth File…
Fauzan
  • 252
  • 4
  • 10
1
vote
1 answer

Pydrive: export doc as html

I'm trying to export a .doc file as html from Google Drive into. Here is my code. I don't see anything in the documentation on how to download a doc as html. But here is my code so far from the examples. I'm not sure what the docsfile is referring…
jason
  • 3,811
  • 18
  • 92
  • 147
1
vote
1 answer

PyCharm recognize a module but do not import it

I try to import the PyDrive module in my PyCharm project : from pydrive.auth import GoogleAuth. I tried different things : Installing it directly from the project interpreter Download it with a pip command and import it with the path for the poject…
Kariamoss
  • 542
  • 1
  • 9
  • 29
1
vote
1 answer

Access shared file with PyDrive

In my app, using PyDrive and Google Drive, a file is created by user A, saved onto Drive using self.User.GoogleFile.SetContentString(json.dumps(self.Message)) and the file is shared with user B. When userB reads the file using…
Psionman
  • 3,084
  • 1
  • 32
  • 65
1
vote
0 answers

Python import pyDrive library error

I installed the google API, pyDrive, and httplib2. I also got a token for my app in google and saved the client_secret.json file in my project's folder. I'm trying to simply run the following print(sys.path) from pydrive.auth import…
1
vote
0 answers

Upload .csv Data to specific sheet of a Google Sheet using PyDrive

So far I've managed to make a python script using PyDrive to a new Google Sheet, using: myfile = drive.CreateFile({ "id": "IDHERE" }) myfile.SetContentFile('FILENAME.csv') myfile.Upload() However, ideally I'd like to be able to specify not…
Daniel Crane
  • 257
  • 3
  • 10
1
vote
3 answers

pyDrive is giving FileNotDownloadableError error

I am trying to download a file with PyDrive from google drive. I followed instruction http://pythonhosted.org/PyDrive/filemanagement.html#download-file-content. And it is working properly from my own domain. Log is as below. $ python…
idom
  • 51
  • 6
1
vote
2 answers

kivy pydrive buildozer ImportError: No module named iri2uri

I have a kivy app, which runs on my linux desktop. I can also build it with buildozer and run the app on my android phone. I include a sync with google-drive through the pydrive modul -> works on linux. I added PyDrive to the requirements in my…
Taper
  • 23
  • 5
1
vote
1 answer

Connecting to Google Drive using Python(PyDrive)

I have this code: from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive import time gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) # Auto-iterate through all files that matches this query file_list =…
Zwierzak
  • 666
  • 1
  • 11
  • 31
1
vote
0 answers

HttpError 403 (forbidden) when accessing Google Drive using PyDrive

I try to perform some operations on my Google Drive using PyDrive (and service account). This account has the right scope set in admin.google.com and in Dev's Console I've turned on both Drive API and Drive SDK. Here's the code snippet: credentials…
Paweł Kłeczek
  • 603
  • 1
  • 5
  • 28
1
vote
0 answers

GDrive HTTP 500 error when copying folder

When copying a directory in google drive, I get a HTTP 500 error. The example is very basic; there are no nested directory structures, so everything takes place in the root directory (which has the id 'root'). Folders are files with the mimeType…
phobic
  • 914
  • 10
  • 24
0
votes
0 answers

How to overwrite files in a Team Drive using Python?

I currently have this code: update_file = drive.CreateFile({ # 'id':file_path, 'parents':[{ 'kind':'drive#fileLink' ,'teamDriveId':'team-drive-file' , 'id':…
0
votes
0 answers

How to make Python executable find client_secrets.json when using pydrive?

I'm working on a program that uploads files to Google Drive using pydrive. It works when I'm running it in IDLE but gives me a Google authorization error when running it as an executable (made using auto-py-to-exe). I think it's because the…
0
votes
0 answers

Issue using file.GetPermissions() in PyDrive when using Google API

I have the correct link to the folder that I am working with, and I am able to set up a connection and do everything properly up to the point where I get the first file in that folder. I am trying to use the file.GetPermissions() function in…