gpt4 book ai didi

Python 3.4 SSL错误 urlopen error EOF occurred in violation of protocol (_ssl.c :600)

转载 作者:太空狗 更新时间:2023-10-30 02:19:07 24 4
gpt4 key购买 nike

我使用 Arch Linux、python 3.4、openSSL 1.0.2d。当我向 https://www.supercash.cz/ 提出请求时我收到这个错误。不管我是使用请求还是在 urllib 中构建,总是出现相同的错误。此站点的 SSL 证书在 Chrome 浏览器中似乎是可以的。

File "/usr/lib64/python3.4/urllib/request.py", line 463, in open
response = self._open(req, data)
File "/usr/lib64/python3.4/urllib/request.py", line 481, in _open
'_open', req)
File "/usr/lib64/python3.4/urllib/request.py", line 441, in _call_chain
result = func(*args)
File "/usr/lib64/python3.4/urllib/request.py", line 1225, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib64/python3.4/urllib/request.py", line 1184, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:600)>

我试过了,但它只适用于 python2.7 Error - urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol , help needed

这是 ssl 测试的结果 https://www.ssllabs.com/ssltest/analyze.html?d=supercash.cz

最佳答案

此处描述了一种可能的解决方案

https://github.com/kennethreitz/requests/issues/3006#issuecomment-274058323

https://web.archive.org/web/20160705110216/https://github.com/kennethreitz/requests/issues/3006

Using python3 and installing the combo (pyopenssl ndg-httpsclient pyasn1 urllib3) did the trick.

pip install pyopenssl ndg-httpsclient pyasn1 urllib3

关于Python 3.4 SSL错误 urlopen error EOF occurred in violation of protocol (_ssl.c :600),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32115607/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com