Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13921

no module named 'dotenv' python 3.8

$
0
0

EDIT: Solved, if anyone comes across this python3.8 -m pip install python-dotenv worked for me.

I've tried reinstalling both dotenv and python-dotenv but I'm still getting the same error. I do have the .env file in the same directory as this script.

#bot.pyimport osimport discordfrom dotenv import load_dotenvload_dotenv()token=os.getenv('DISCORD_TOKEN')client = discord.Client()@client.eventasync def on_ready():    print(f'{client.user} has connected to Discord!')client.run(token)

Viewing all articles
Browse latest Browse all 13921

Trending Articles