Skip to content
site logo mobile

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 Likes
227 Views
(@santosh776)
Posts: 30
Trusted Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
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: 917
Noble Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power 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:
build ai agents ad