I'm trying to execute this example here: Step 3 @ Gmail API Python Quickstart I got two errors and got aroudn them
Unable to unintsall a exisiting version of six - got around by setting it to
--ignore-installed sixUnable to find httplib2 - got around by doing a specific
pip2 install httplib2
Now when I go the working directory where my client_secret.json & quickstart.py are located and execute a python quickstart.py I get the follwoing error. Any ideas how to get this code to execute.
bash-3.2$ python quickstart.py
/Library/Python/2.7/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /Users/Zafar/.credentials/gmail-python-quickstart.json: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
Traceback (most recent call last):
File "quickstart.py", line 73, in <module>
main()
File "quickstart.py", line 57, in main
credentials = get_credentials()
File "quickstart.py", line 45, in get_credentials
credentials = tools.run_flow(flow, store, flags)
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/tools.py", line 218, in run_flow
authorize_url = flow.step1_get_authorize_url()
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 1934, in step1_get_authorize_url
return _helpers.update_query_params(self.auth_uri, query_params)
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 222, in update_query_params
parts = urllib.parse.urlparse(uri)
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlparse'
sixpython3 - pip3 uninstall six, python2 - pip uninstall six and then reinstall