Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing config.env #8

Open
nader-apr opened this issue Sep 28, 2024 · 1 comment
Open

missing config.env #8

nader-apr opened this issue Sep 28, 2024 · 1 comment

Comments

@nader-apr
Copy link

Missing config.env and need to import load_dotenv from dotenv in variables.py file.

confg.env contains:
SPOT_SEEK_BOT_API = ""
MUSIC_DATABASE_ID = ""
LOG_CHANNEL_ID = ""
SPOTIFY_APP_CLIENT_ID = ""
SPOTIFY_APP_CLIENT_SECRET = ""

@nader-apr
Copy link
Author

Dotenv doesn't work. The best alternative is Environ.

Put this in the variables.py file:

import environ
environ.Env.read_env('config.env')

bot_api = os.environ['SPOT_SEEK_BOT_API']
database_channel = os.environ['MUSIC_DATABASE_ID']
log_channel_id = os.environ['LOG_CHANNEL_ID']
spotify_client_id = os.environ['SPOTIFY_APP_CLIENT_ID']
spotify_client_secret = os.environ['SPOTIFY_APP_CLIENT_SECRET']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant