Forum in maintenance, we will back soon 🙂
Notifications
Clear all
Getting an error while running the new Affliliate Marketing with AI tool after inserting OpenAPI key
Topic starter
Posted : 01/13/2024 7:57 am
Topic Tags
Hello friend, what is your problem?
Posted : 01/13/2024 12:36 pm
@evanbose2001 I see that you attempted to put your API key in a .env file that you load with load_dotenv() function. The issue is that you use the actual key in trying to retrieve the key value in os.getenv() function. You therefore end up with a None value in the OPENAI_API_KEY variable. You need the variable in the .env file on the left side of the = in the os.getenv() function.
# .env file OPENAI_KEY = 'sk-xxxxxxx'
# app.py from dotenv import load_dotenv import os # load the .env file load_dotenv() # get the API key OPENAI_API_KEY = os.getenv('OPENAI_KEY')
I hope this helps.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
Posted : 01/13/2024 4:10 pm
Hasan Aboul Hasan reacted
Forum Information
Our newest member: DMC8844
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed