I'm trying to use PyDrive to get a list of all the files in my Google Drive. I read the documents and followed all the steps. I have the secrets.json client stored, but I keep getting the following error. The code I'm using is:
from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() gauth.LocalWebserverAuth()
The error I get, how can I fix it?
Traceback (most recent call last): File "C:\Users\mydrive\Documents\Python\Google_Drive.py", line 5, in <module> gauth.LocalWebserverAuth() File "build\bdist.win-amd64\egg\pydrive\auth.py", line 67, in _decorated self.GetFlow() File "build\bdist.win-amd64\egg\pydrive\auth.py", line 345, in GetFlow self.LoadClientConfig() File "build\bdist.win-amd64\egg\pydrive\auth.py", line 294, in LoadClientConfig self.LoadClientConfigFile() File "build\bdist.win-amd64\egg\pydrive\auth.py", line 314, in LoadClientConfigFile raise InvalidConfigError('Invalid client secrets file %s' % error) InvalidConfigError: Invalid client secrets file File not found: "client_secrets.json"
source share