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
requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:600) #2616
Comments
Python 3.4, OS X Yosemite, Requests 2.7.0: I cannot reproduce this bug. =) Can you consistently hit it? What requests version are you using? |
Also, what version of openssl and do you have |
requests 2.7.0 I installed the latest version of pyOpenSSL 0.15.1 and ran the same request again. |
Are you behind a proxy? |
No, I am not behind a proxy. |
I consistently get this problem. By now, I have tried with 3 different networks. As soon as you are sure that this problem is not relative to requests, we can drop this :) because I only have this problem on my dev machine. Our production environment is Ubuntu and the request to the same url works fine there. But until then, I am more than happy to give all the information you need for debugging. |
The OpenSSL version number you gave us: how did you obtain it? |
I typed in "openssl version" in the terminal:
And for the one in Python:
|
Sorry, can you do import ssl
print ssl.OPENSSL_VERSION |
|
Awesome, so you're using a very old OpenSSL version. How did you install Python 3? |
I used Mac OS X 64-bit/32-bit installer from here https://www.python.org/downloads/release/python-340/ |
Weird, I thought that bundled a newer OpenSSL. I recommend installing it using Homebrew, which will link against a newer OpenSSL. |
What about macports? I use this as my package manager. On 18:54, Fri, May 29, 2015 Cory Benfield notifications@github.com wrote:
|
I don't know about macports: you'll want to check with them whether they compile against the system OpenSSL or against one they provide. |
If somebody still encounters this issue on their OS X stack I'll strongly recommend reinstalling Python 3 from https://www.python.org/downloads/ rather than homebrew - I've faced exactly the same thing and this was a proper solution for me 😄 |
@mieciu thanks for the input. That said, my recommendation is to use homebrew. 😉 |
EOF occurred in violation of protocol (_ssl.c:590) i am getting this error. and do sess.post() but still got the same error. could you guys help me it that??? |
@biplab-dholey This error can occur for a number of reasons. The retries count is unrelated. This error results from your TLS configuration, and without more information it's very difficult for us to help. |
I hit this error and I finally find I was accessing a none HTTPS service with a HTTPS protocol. |
default_socket = socket.socket
socks.set_default_proxy(socks.SOCKS5, SOCKS5_PROXY_HOST, SOCKS5_PROXY_PORT)
socket.socket = socks.socksocket
import requests
html_source = requests.get(url, headers={"User-Agent": "Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101"}).text
the environment of my computer
BUT, this code works well when getting |
I am using Python 3.4 on OSX Yosemite
The text was updated successfully, but these errors were encountered: