AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

PINECONE_ENV is defaulting to "us-west1-gcp" when connecting to Pinecone instead of the region defined in .env

Open JTKunkel opened this issue 1 year ago • 1 comments

When trying to run Auto-GPT with Pinecone memory enabled, I am receiving this error:

"FAILED TO CONNECT TO PINECONE ('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.') DOUBLE CHECK CONFIGURATION Please ensure you have setup and configured Pinecone properly for use.You can check out https://github.com/Torantulino/Auto-GPT#-pinecone-api-key-setup to ensure you've set up everything correctly."

Based on the discussion linked below where the reporter received the same error, it looks like the Pinecone region defined in the .env file is not being used when attempting to connect to Pinecone and is defaulting to the "us-west1-gcp" region. Other parameters defined in the .env file, such as the OpenAI API key, are still working as expected.

https://github.com/Significant-Gravitas/Auto-GPT/discussions/2610#discussioncomment-5681086_

JTKunkel avatar Apr 21 '23 04:04 JTKunkel

I'm having the same issue. Only started when I updated .env. I tried reverting back but doesn't fix the issue. Fresh install of all files, same problem. Turned memory backend to local, but same problem. Assume it's related to the .env file not being read properly.

$ python -m autogpt FAILED TO CONNECT TO PINECONE ('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.') DOUBLE CHECK CONFIGURATION Please ensure you have setup and configured Pinecone properly for use.You can check out https://github.com/Torantulino/Auto-GPT#-pinecone-api-key-setup to ensure you've set up everything correctly.

.env setting: # PINECONE_ENV=northamerica-northeast1-gcp

Maathony avatar Apr 21 '23 17:04 Maathony

Just realised every line in the new env is commented out...

EDIT: can confirm, this is the issue on my side.

Maathony avatar Apr 22 '23 01:04 Maathony

Did u solved it? Same issue here.

gunesatakan avatar Apr 23 '23 01:04 gunesatakan

I encounter the same issue. Looking forward the fix.

andy20230323 avatar Apr 23 '23 06:04 andy20230323

This isn't a memory issue after all, this is I and others not realizing the settings in .env had been commented out since the last stable version, my brain glossed over them because they were fine previously. Thanks to @Maathony for having his head on straight and noticing the issue. Un-comment the lines you need and save.

JTKunkel avatar Apr 23 '23 16:04 JTKunkel