requests.exceptions.SSLError: HTTPSConnectionPool报错解决方案
Posted xqq-admin-content
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了requests.exceptions.SSLError: HTTPSConnectionPool报错解决方案相关的知识,希望对你有一定的参考价值。
运行脚本报错:
Traceback (most recent call last):
File "F:/Interface_Study/study_requests/auto_get_post.py", line 24, in <module>
res = Calendar_Query().request_main(url,‘get‘,data)
File "F:/Interface_Study/study_requests/auto_get_post.py", line 12, in request_main
response_data = requests.get(url,data)
File "E:ProgramDataAnaconda3envspython37libsite-packages
equestsapi.py", line 75, in get
return request(‘get‘, url, params=params, **kwargs)
File "E:ProgramDataAnaconda3envspython37libsite-packages
equestsapi.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "E:ProgramDataAnaconda3envspython37libsite-packages
equestssessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "E:ProgramDataAnaconda3envspython37libsite-packages
equestssessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "E:ProgramDataAnaconda3envspython37libsite-packages
equestsadapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘api.yonyoucloud.com‘, port=443): Max retries exceeded with url: /apis/dst/calendarholiday/calendar_queryHoliday?countrycode=CN&date=2019-11-25 (Caused by SSLError("Can‘t connect to HTTPS URL because the SSL module is not available."))
解决方案:
按照以上方法进行安装后,发现还是报一样的错误。未果。
重新采用另一种解决方案:
已解决:
以上是关于requests.exceptions.SSLError: HTTPSConnectionPool报错解决方案的主要内容,如果未能解决你的问题,请参考以下文章