I just did a fresh install (from source) of Python 3.3 and I installed the 'requests' library. I'm attempting a very simple request:
r = requests.get('https://www.google.com/')
And I'm getting a very strange error in return:
File "/usr/local/lib/python3.3/http/cookiejar.py", line 1647, in extract_cookies
if self._policy.set_ok(cookie, request):
File "/usr/local/lib/python3.3/http/cookiejar.py", line 931, in set_ok
if not fn(cookie, request):
File "/usr/local/lib/python3.3/http/cookiejar.py", line 952, in set_ok_verifiability
if request.unverifiable and is_third_party(request):
AttributeError: 'MockRequest' object has no attribute 'unverifiable'
Seeing as I'm still somewhat a Python beginner, I have absolutely no idea what is causing this error. Any ideas?
This works in python 3.2:
The
requests
FAQ states python 3 is supported up to version 3.2, and you have just found out on python 3.3,requests
does not (yet) work.There is a patch available in the issue tracker, so it's only a matter of time.
Update: Version 0.14.1 was released on 2012/10/01, with the fix: