-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ndg package not being installed #3605
Comments
The reason we don't install it when you install requests is that it's optional. Requests can, on many systems, successfully handle TLS without needing any third-party libraries. However, some users will want to use a newer version of OpenSSL or enable Requests to use more advanced features. Those require some additional third-party dependencies that are strictly optional. They can be requested when installing Requests by running |
BTW I am using |
@IntelBob The security packages don't install a newer OpenSSL on Linux and, even if they did, they don't monkeypatch the standard library. Are you having a specific problem on Ubuntu? |
@Lukasa I am getting intermittent |
You can try, but intermittent errors rather suggest that the problem isn't with OpenSSL. Are the errors intermittent in the sense that they only occur for some hosts, or intermittent in the sense that sometimes a request works for a host and sometimes it fails? |
It's the latter, intermittent in the sense that it works almost all the time and occasionally it will generate that error, it's not reliably reproducible so I don't know how to debug it, I am on Python 2.7.12. Also I am using requests with threads and unsure if such an error might have caused a thread to hang (I am using try...exception block), that's the core of my issue is that I get these random hanging threads and no discernible cause. Also sometimes i also get this error |
So both of these intermittent issues smell like issues that have nothing to do with your OpenSSL version and everything to do with various kinds of network weirdness. Both of these errors basically boil down to "the remote peer shut the connection down when we didn't expect them to". Working out a more specific understanding of why the remote peer is doing that is much harder if you don't have access to server logs. |
Yeah, I kinda had the same feeling since the errors are intermittent and random and unfortunately I don't have access to the backend logs. As a side note, do you know if using |
Yes, |
Hi @Lukasa I the same error , and it stuck me for couple of days 👍 Please help me... |
@szyl111 Your code is using urllib2. This issue tracker is for support with the Python Requests library only. You'll need to go discuss your problem upstream with the Python Development team. |
So I had a very long day debugging why I was getting
EOF occurred in violation of protocol (_ssl.c:590)
It turns out that init.py tried to monkey patch the
ssl_wrap_socket
But it couldn't, since it couldn't import
from .packages.urllib3.contrib import pyopenssl
Which due to
packages/urllib3/contrib/pyopenssl.py
tried to import:from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
but
ndg
didn't exist.Once I installed
ndg-httpsclient
then the error went away.What I am wondering is why package
ndg-httpsclient
was not installed during installing requests? Or is it supposed to be installed individually?The text was updated successfully, but these errors were encountered: