HTTPError: ('401 Client Error: Unauthorized for url: https://controller.us-west1-gcp.pinecone.io/actions/whoami', 'API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.')
I’ve confirmed my API key is correct, and PINECONE_ENV=us-west1-gcp-free , yet note the environment it is complaining about is us-west1-gcp.
Okay so if I del those two variables and call pinecone.init with hard-coded values, it seems like it works. It doesn’t work if I change variable names to something like PINECONE_API_KEY_VAR and PINECONE_ENV_VAR…
If I load these into the environment and reference via
it works. So basically, it looks like pinecone.init needs to either take hard-coded literals in the arguments to api_key and environment, or it needs to reference them from os.environment. For some reason, it doesn’t seem to like these as variables, at least as I’m defining them…