Skip to content Skip to sidebar Skip to footer

Requests.exceptions.sslerror: [errno 8] _ssl.c:504: Eof Occurred In Violation Of Protocol

I have tried everything on this q&a to solve it but I still receive that error. My latest attempt is based on Lukasa's comment and my code looks like this: import requests from

Solution 1:

In all of the versions of Requests on PyPI there is no support for requesting HTTPS sites over a proxy since there is no support for the CONNECT verb. Our pre-release branch for 2.0 has this support and it works on every proxy I have tried. If you wish to check that out and try it with this, then you won't need the custom adapter either.

Otherwise, you will have to wait until we release 2.0

Solution 2:

You have to use http as the protocol for your proxy (although you are using https over it)

proxy = 'http://78.130.136.2:8080'

But like @sigmavirus24 said the current release version of requests has some problems with http proxies. With this setting you will be able to use the proxy (not all proxies but this proxy in particular works).

Be careful: With the current version the data is NOT encrypted between you and your proxy.

Repeat: The proxy and everything between it and you can read the data!

Post a Comment for "Requests.exceptions.sslerror: [errno 8] _ssl.c:504: Eof Occurred In Violation Of Protocol"