Open farenhite opened 6 years ago
same issue persists, doesn't work
i got the same issue
I have the same issue. Has anyone been able to solve? It has to do with urllib.pathname2url. It is unable to handle the data object being passed in. I'm running on a windows 10 environment
urllib has been updated, it should now be urllib.request.pathname2url
https://stackoverflow.com/questions/30654772/python-3-4-2-urlib-no-attribute-pathname2url
@johnvalin but the project is using python2.7
and if I change to urllib.request.pathname2url
it says urllib doesn't have a attribute request
F:\py>py -2.7 main.py 528817151 ~ Connecting to Instagram Traceback (most recent call last): File "main.py", line 19, in
if insta.login() == False:
File "F:\py\insta.py", line 45, in login
if (self.SendRequest('accounts/login/', self.generateSignature(json.dumps(data)), True)):
File "F:\py\insta.py", line 73, in generateSignature
return 'ig_sig_key_version=' + self.SIG_KEY_VERSION + '&signed_body=' + hmac.new(self.IG_SIG_KEY.encode('utf-8'), data.encode('utf-8'), hashlib.sha256).hexdigest() + '.' + urllib.pathname2url(data)
File "C:\Users\Amir.windows-build-tools\python27\lib\nturl2path.py", line 60, in pathname2url
raise IOError, error
IOError: Bad path: .........
i use python 2 and whats the problem?