I am getting [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646) for python request.get and request.post calls. Previously the above calls were working fine,now we introduced HTTPS redirection in IIS,and we are gettng this error. So I changed the calls from requests.get(url) to requests.get(url, verify=False) and requests.post(url, data=data) to requests.post(url, data=data, verify=False). Then the POST Web APIS are not reachable. Then I tried changing the URL from Http to Https and made verify=false ,in this case the request calls are working fine but am getting warnings like "its better to add certificate verification". I also tried to create an X.509 (.CER) certificate file from Server side certificate option and gave the .cer file path for verify(verify='path\to\cer file),still am geetting "[SSL: CERTIFICATE_VERIFY_FAILED]". Is there anything wrong in this approach. Anyone face this issue earlier? Please share if you have any insights about this issue.
Thanks in advance Susmitha