Skip to content

Exception in APILogger: {"message":"Invalid API Key!","data":null} #1391

Answered by dosubot bot
pgvetrivel asked this question in Q&A
Discussion options

You must be logged in to vote

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 name PANDASAI_API_KEY instead of PANDAS_API_KEY. The Session class in pandasai looks for PANDASAI_API_KEY to retrieve the API key [1].

Update your .env file to:

PANDASAI_API_KEY=your_api_key_here

Then, adjust your code to:

pandaskey = os.getenv('PANDASAI_API_KEY')

This should resolve the "Invalid API Key" error.

To continue talking to Dosu, mention @dosu.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pgvetrivel
Comment options

Answer selected by pgvetrivel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant