Trying to use the google api client, I have gotten an error that MANY others have gotten:
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlencode'
I have tried every solution found in StackOverflow, GitHub, and other places, including:
1) from this thread, changing the path in the actual code:
import sys
sys.path.insert(1, '/Library/Python/2.7/site-packages')
2) from this thread, changing the python path in the .bashrc and .bash_profile files:
pip show six | grep "Location:" | cut -d " " -f2
export PYTHONPATH=$PYTHONPATH:<pip_install_path>
source ~/.bashrc
3) and from this thread, downgrading my google api client to 1.3.2 (or at least trying to).
I'm new to programming so this could be a basic problem but I've spent days trying to troubleshoot and to no avail. It seems like no matter what I do, the old 1.4 version of six is being used. Any help you could provide would be MUCH appreciated!
EDIT: Full Traceback:
Traceback (most recent call last):
File "/Users/zachgoldfine/PycharmProjects/FirstTry/GetAroundRentalSpreadsheetRead.py", line 71, in <module>
spreadsheetId=spreadsheetId, range=rangeName1).execute()
File "/Library/Python/2.7/site-packages/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/googleapiclient/http.py", line 836, in execute
method=str(self.method), body=self.body, headers=self.headers)
File "/Library/Python/2.7/site-packages/googleapiclient/http.py", line 162, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/transport.py", line 186, in new_request
credentials._refresh(orig_request_method)
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 761, in _refresh
self._do_refresh_request(http)
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 774, in _do_refresh_request
body = self._generate_refresh_request_body()
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 716, in _generate_refresh_request_body
body = urllib.parse.urlencode({
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlencode'