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

I get an error trying to run the bot.py #17

Open
ferx2006 opened this issue Jan 13, 2022 · 5 comments
Open

I get an error trying to run the bot.py #17

ferx2006 opened this issue Jan 13, 2022 · 5 comments

Comments

@ferx2006
Copy link

Traceback (most recent call last):

File "/home/bp/Downloads/Telegram-Airdrop-Bot-main/bot.py", line 26, in

COIN_SYMBOL = os.environ["COIN_SYMBOL"]

File "/usr/lib/python3.9/os.py", line 679, in getitem

raise KeyError(key) from None

KeyError: 'COIN_SYMBOL'

@trizin
Copy link
Owner

trizin commented Jan 13, 2022

Have you set your environment variables?

@ferx2006
Copy link
Author

Yes, I set .env file

@kufinance
Copy link

Hello, have you found a solution for this error?

@Skandesh
Copy link

check in docker-compose.yml file if the .env file is set with correct credentials, this error is due to incorrect environment variables.

@elusiee
Copy link

elusiee commented Jun 24, 2023

Traceback (most recent call last):

File "/home/bp/Downloads/Telegram-Airdrop-Bot-main/bot.py", line 26, in

COIN_SYMBOL = os.environ["COIN_SYMBOL"]

File "/usr/lib/python3.9/os.py", line 679, in getitem

raise KeyError(key) from None

KeyError: 'COIN_SYMBOL'

Install python-dotenv package using pip install python-dotenv then import it in the env.py file using from dotenv import load_dotenv then call the load_dotenv() function immediately after importing it just about the next line.

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

5 participants