Python SSL connection “EOF occurred in violation of protocol”

好久不见. 提交于 2019-11-30 04:40:37
user962563

Using the forced TLSv1 fix as suggested by J.F Sebastian fixed all the issues I was facing.

Hints for future questions regarding:

  • DNSError exception - upgrading Gevent from 0.13.X to 1.0rc fixes this issue

  • SSL issues - look at fix in link provided by J.F Sebastian

I installed the latest Python 2.7 (2.7.11) and the problem went away. I believe the problem might even be solved back in 2.7.6 (I was using 2.7.5 on Mac OSX).

I was having the same error during fetching tweets for my machine learning . Doing the pip install of the following helped me. This works:

pip install ndg-httpsclient
pip install pyopenssl
pip install pyasn1

It removed my SSLError: EOF occurred in violation of protocol (_ssl.c:590) error.

Hope it helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!