I have a python (2.7) program that uses oauth2client to access google drive. I'm trying to get my initial credentials file. I'm using this:
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run_flow
SCOPE = 'https://www.googleapis.com/auth/drive'
credentials = 'https://www.googleapis.com/auth/drive'
CLIENT_SECRET_FILE = os.path.join(credential_path, 'client_secret.json'
flow = flow_from_clientsecrets(CLIENT_SECRET_FILE, scope=SCOPE)
http = httplib2.Http()
credentials = run_flow(flow, store, http=http)
However, I am getting what appears to be an Argparser usage error?
usage: responseratedash2.py [--auth_host_name AUTH_HOST_NAME]
[--noauth_local_webserver]
[--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]]
[--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
responseratedash2.py: error: unrecognized arguments: -r 2341 -t
responseratedash2.py is the name of my program, and -r 2341 -t are valid arguments for that program. But this error is happening in the run_flow
line...
Why is this happening?
(ETA: Explaining how I'm using oauth2client, the flow functions are both from that library.)