Hello Jason,
many thanks for this report!
On Thursday 23 October 2014 08:47:24 Jason Gillman Jr. wrote:
> Source: python-requests
> Version: 2.3.0-1
> Severity: normal
>
> Dear Maintainer,
>
> It appears as though there is an error with the __str__ method when trying
> to handle the requests.exceptions.SSLError exception.
[CUT Python Interactive shell and tracebacks]
> Please let me know if there is any more information you need.
Many thanks for the detailed report.
I'm able to riproduce the issue inside a virtualenv:
$ pip freeze
argparse==1.2.1
cffi==0.8.6
cryptography==0.6.1
ndg-httpsclient==0.3.2
pyOpenSSL==0.14
pyasn1==0.1.7
pycparser==2.10
requests==2.4.3
six==1.8.0
wsgiref==0.1.2
$ python test.py
<class 'requests.packages.urllib3.exceptions.SSLError'>
Traceback (most recent call last):
File "test.py", line 12, in <module>
print m
TypeError: __str__ returned non-string (type Error)
Something strange happen with pyasn1, infact without it:
$ python test.py
/home/eriol/.virtualenvs/testrequests/local/lib/python2.7/site-
packages/ndg/httpsclient/subj_alt_name.py:22: UserWarning: Error importing
pyasn1, subjectAltName check for SSL peer verification will be disabled.
Import error is: No module named pyasn1.type
warnings.warn(import_error_msg)
/home/eriol/.virtualenvs/testrequests/local/lib/python2.7/site-
packages/ndg/httpsclient/ssl_peer_verification.py:24: UserWarning:
SubjectAltName support is disabled - check pyasn1 package installation to
enable
warnings.warn(SUBJ_ALT_NAME_SUPPORT_MSG)
/home/eriol/.virtualenvs/testrequests/local/lib/python2.7/site-
packages/ndg/httpsclient/subj_alt_name.py:22: UserWarning: Error importing
pyasn1, subjectAltName check for SSL peer verification will be disabled.
Import error is: No module named pyasn1.type
warnings.warn(import_error_msg)
<class 'requests.packages.urllib3.exceptions.SSLError'>
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
On Debian python-requests has python-ndg-httpsclient, python-openssl and
python-pyasn1 into Recommends to ensure SNI works.
Can you confirm that installing ndg-httpsclient, openssl and pyasn1 inside a
virtualenv and using requests form PyPi, will give the same result? Thanks!
I will coordinate with upstream since they are very supportive!
Cheers,
--
Daniele Tricoli 'Eriol'
http://mornie.org
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]