The error message [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)
typically occurs when the SSL certificate of the server you are trying to connect to cannot be verified. This can happen for a number of reasons, including:
- The certificate is self-signed, and the certificate authority (CA) that issued it is not trusted by the client.
- The certificate has expired or been revoked.
- The certificate is not properly installed on the server.
- The client’s system is missing the necessary root CA certificate to verify the server’s certificate.
- The client’s system date is incorrect.
To resolve this issue, you can try the following:
- Verify that the server’s SSL certificate is valid and trusted by a well-known CA.
- Check the system date and time of your client machine, it should be correct.
- If the server’s certificate is self-signed, you can install the certificate’s root CA on your client machine.
- If the certificate is installed correctly on the server, but the client is still unable to verify it, you may need to check the SSL configuration on the client machine.
- If the server’s SSL certificate is valid but is still not working, you can try to disable SSL certificate verification on the client side.
- If the problem persist, you can try to use a different version of python, or an older version of the package you are using.
It’s important to keep in mind that disabling certificate verification can pose security risks, so it’s a good idea to resolve the issue by properly installing or trusting the certificate.