Skip to content

Forum in maintenance, we will back soon 🙂

Getting an error wh...
 
Notifications
Clear all

Getting an error while running the new Affliliate Marketing with AI tool after inserting OpenAPI key

3 Posts
3 Users
1 Reactions
303 Views
(@Anonymous 25335)
Posts: 1
New Member Guest
Topic starter
 
Screenshot 2024 01 13 123910
Screenshot 2024 01 13 132551
 
Posted : 01/13/2024 7:57 am
(@husein)
Posts: 464
Member Moderator
 

Hello friend, what is your problem?

 
Posted : 01/13/2024 12:36 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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
Share: