运行脚本报错:
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."))
解决方案:
按照以上方法进行安装后,发现还是报一样的错误。未果。
重新采用另一种解决方案:
已解决: