On 4-5-2015 21:52, Cecil Westerhof wrote: > But I keep getting the error. Only 2 lines earlier: > >>> import urllib3.contrib.pyopenssl > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python3.4/site-packages/urllib3/contrib/pyopenssl.py", > line 56, in <module> > from socket import _fileobject, timeout > ImportError: cannot import name '_fileobject' >
Right. This seems to be an issue with the "contrib" module pyopenssl that is provided as a courtesy with urllib3. The latter is 100% python 3 compatible from what I read in their docs. Looking at that contrib module however: https://github.com/shazow/urllib3/blob/master/urllib3/contrib/pyopenssl.py In the first few lines in the module docstring it states it is for Python 2. I guess you won't be able to use this urllib3 contrib module with python 3. Maybe you can contact its author to ask for a fix? Irmen -- https://mail.python.org/mailman/listinfo/python-list