[Python-modules-team] Bug#781781: python-urllib3: AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
Daniele Tricoli
eriol at mornie.org
Wed Jun 3 14:59:28 UTC 2015
Hello Simon,
thanks for your report!
On Monday 01 June 2015 12:54:23 Simon John wrote:
> I'm on Scratch/Sid and am still getting the old SSLv3 error with the
> 1.10 packages, did the patch not make it in?
I can assure that the patch was merged also upstream. But I have a possible
idea about your problem, see below.
> $ python -c 'import requests'
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py",
> line 53, in <module>
> from .packages.urllib3.contrib import pyopenssl
> File
> "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/py
> openssl.py", line 43, in <module>
> ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
> AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
The packaged version of requests reside on /usr/lib/python2.7/dist-
packages/requests/, did you installed it with a "sudo pip install”? Anyway
packaged version of requests doesn't use “.packages.*” as import point.
> # dpkg --list|egrep -o 'python3?-(urllib3|pip)\s+([0-9\.\-])+'
> python-pip 1.5.6-6
> python-urllib3 1.10.4-1
> python3-pip 1.5.6-6
> python3-urllib3 1.10.4-1
> The easiest way to reproduce it is to just type "pip" in a terminal.
I have the same versions, and pip is working fine, can you try removing the
local installed version of requests and use the packaged one instead?
If you need a specific version of requests I suggest to use a virtualenv
instead of installing it system wide.
> Python3 (and pip3) seems to be fine, its only 2.7 that's broken.
I guess you did not install a local version of requests for Python3, is this
right?
Kind regards,
--
Daniele Tricoli 'Eriol'
https://mornie.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20150603/eeaf5014/attachment.sig>
More information about the Python-modules-team
mailing list