ERROR: Test failed: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)

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:

  1. The certificate is self-signed, and the certificate authority (CA) that issued it is not trusted by the client.
  2. The certificate has expired or been revoked.
  3. The certificate is not properly installed on the server.
  4. The client’s system is missing the necessary root CA certificate to verify the server’s certificate.
  5. The client’s system date is incorrect.

To resolve this issue, you can try the following:

  1. Verify that the server’s SSL certificate is valid and trusted by a well-known CA.
  2. Check the system date and time of your client machine, it should be correct.
  3. If the server’s certificate is self-signed, you can install the certificate’s root CA on your client machine.
  4. 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.
  5. 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.
  6. 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.

Leave a Comment