Unable to connect using code from docs


Trying to simply connect to the API, but receiving the error: requests.exceptions.SSLError: HTTPSConnectionPool(host=‘controller.asia-southeast1-gcp.pinecone.io’, port=443): Max retries exceeded with url: /actions/whoami (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1122)’)))

My code looks like this (with key and env defined elsewhere):

import pinecone
pinecone.init(api_key=PINECONE_KEY, environment=PINECONE_ENV)

Please help!

Hi Seth,

Are you running on macOS? Depending on your python install, you may need to run the “Install Certificates.command” found in Macintosh HD > Applications > Python

If not, let me know your OS, Python version and installation type (installer, homebrew, etc)