Need to update error handling for pyOpenSSL
See original GitHub issueIf an SSLError comes from pyOpenSSL, we attempt to determine if it’s an error due to request timeouts on python 2.6 being raised as BaseSSLErrors here. If the handshake ends unexpectedly under pyOpenSSL, then we get an SSLError that has a captured SysCallError which when you call str(SSLError(msg, SysCallError(code, msg))) you get
TypeError: __str__ returned non-string (type SysCallError)
So we might want to update how we handle SSLErrors to accomodate pyOpenSSL. To be clear, I observed this on: python 2.7.9 with openssl 1.0.1l (from brew) and I was using requests to debug an issue with https://apissl.cloudfactory.com, e.g., requests.get('https://apissl.cloudfactory.com')
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:29 (17 by maintainers)
Top Results From Across the Web
openssl - easy_install PyOpenSSL error - Stack Overflow
In order to install it under virtualenv, you should first install the required packages. On ubuntu: sudo apt-get install python-dev ...
Read more >Installation — pyOpenSSL 22.1.0 documentation
To install pyOpenSSL: $ pip install pyopenssl. If you are installing in order to develop on pyOpenSSL, move to the root directory of...
Read more >[Fixed] ModuleNotFoundError: No module named 'pyopenssl'
Quick Fix: Python raises the ImportError: No module named 'pyopenssl' when it cannot find the library pyopenssl . The most frequent source of...
Read more >[Fix] ImportError: 'pyOpenSSL' module missing required ...
When running certbot commands, you get an error like the following: ImportError: 'pyOpenSSL' module missing required functionality. Try ...
Read more >pyOpenSSL · PyPI
Extensive error-handling mechanism, mirroring OpenSSL's error codes ... X509StoreContextError exception has been refactored, changing its internal ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had to fix this on a production server by editing
requests/packages/urllib3/connectionpool.py. At line 315, beforeif 'timed out' in str(err) or 'did not complete (read)' in str(err):I inserted:At least I get some inkling on what’s going on - in my case this bubbles up to my application from
requestsas:Yea that whole process is voodoo. 😕
Open to basically any kind of change. What do you have in mind?