Python请求SSL ConnectionError:超过最大重试次数

2024-09-28 16:58:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我疯了,因为我收到这个错误,而简单的ssl请求,这是工作在不同的linuxes没有问题,但在这个Debian设置。在

我的pythonrequests版本是2.0.1,我已经用1.2.0和其他一些我在网上读到的东西进行了测试,但是一点运气都没有。。。在

import requests
r = requests.get('https://www.domain.com')

ConnectionError: HTTPSConnectionPool(host='www.domain.com', port=443): Max retries exceeded with url: / (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)

Tags: httpsimport版本comsslgetbydomain