Python SSL connection “EOF occurred in violation of protocol”

前端 未结 3 1769
春和景丽
春和景丽 2020-12-29 05:01

I\'m using Django Celery task to connect to Facebook Graph API with requests lib using Gevent. Issue I\'m constantly running at is that every now and then I get EOF occurred

相关标签:
3条回答
  • 2020-12-29 05:28

    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).

    0 讨论(0)
  • 2020-12-29 05:28

    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.

    0 讨论(0)
  • 2020-12-29 05:47

    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

    0 讨论(0)
提交回复
热议问题