码迷,mamicode.com
首页 > Web开发 > 详细

requests.exceptions.SSLError: HTTPSConnectionPool报错解决方案

时间:2019-11-25 18:49:59      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:max   pre   error:   recent   eth   python   post   self   method   

技术图片

 

 运行脚本报错:

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:\ProgramData\Anaconda3\envs\python37\lib\site-packages\requests\api.py", line 75, in get
return request(‘get‘, url, params=params, **kwargs)
File "E:\ProgramData\Anaconda3\envs\python37\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "E:\ProgramData\Anaconda3\envs\python37\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "E:\ProgramData\Anaconda3\envs\python37\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "E:\ProgramData\Anaconda3\envs\python37\lib\site-packages\requests\adapters.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报错解决方案

标签:max   pre   error:   recent   eth   python   post   self   method   

原文地址:https://www.cnblogs.com/xqq-admin-content/p/11928363.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!