Skip to content

Forum in maintenance, we will back soon 🙂

raise ValueError("P...
 
Notifications
Clear all

[Solved] raise ValueError("Please set the OPENAI_API_KEY in .env file.") ValueError: Please set the OPENAI_API_KEY in .env file.

2 Posts
2 Users
1 Reactions
340 Views
(@santosh776)
Posts: 30
Trusted Member
Topic starter
 

i am using Generate Content Ideas Fast With AI & Automation script. i also set my API key as per introductions but still facing this error:-

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI-Content-Ideas-Generator-Prototype-main\my_functions.py", line 17, in <module>
raise ValueError("Please set the OPENAI_API_KEY in .env file.")
ValueError: Please set the OPENAI_API_KEY in .env file.

For your information please find attached screen shot

 

Screenshot 2024 01 19 130653

 

 
Posted : 01/19/2024 7:37 am
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

I need to see the contents of the app.py file. You can use the (<>) icon to add a paste of the code.

The format of the .env file should be

OPENAI_API_KEY = sk-xxxx

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 01/19/2024 6:23 pm
Share: