Exception in APILogger: {"message":"Invalid API Key!","data":null} #1391
-
Hi I am trying out pandasai for the first time. I tried the following code import os sales_by_country = pd.DataFrame({ load_dotenv() agent = Agent(sales_by_country) it throws up the following error api key is correctly called from the .env file. i am able to print and check. i have created the apikey in https://www.pandabi.ai. to use use BambooLLM please help me out. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @pgvetrivel 👋, I'm here to help you with any bugs, questions, or contributions you have. Let's dive into the issue together! Ensure that your Update your
Then, adjust your code to: pandaskey = os.getenv('PANDASAI_API_KEY') This should resolve the "Invalid API Key" error. |
Beta Was this translation helpful? Give feedback.
Hey @pgvetrivel 👋, I'm here to help you with any bugs, questions, or contributions you have. Let's dive into the issue together!
Ensure that your
.env
file uses the correct environment variable namePANDASAI_API_KEY
instead ofPANDAS_API_KEY
. TheSession
class in pandasai looks forPANDASAI_API_KEY
to retrieve the API key [1].Update your
.env
file to:Then, adjust your code to:
This should resolve the "Invalid API Key" error.
To continue talking to Dosu, mention @dosu.