Closed vpsbykaif closed 6 months ago
I an executing gunicorn
main:web_app --bind 0.0.0.0:8080 -k aiohttp.GunicornWebWorker
.
The directory which I execute the code is root/gemi-bot
the env file is in the gemi-bot folder.
Oh sorry, my bad.
VS code loads the .env file while opening terminal so I was kind-of unaware of this situation. The .env file needs to be somehow loaded as environment variables then only this will work.
You can install python-dotenv
package and add this code in the top of main.py
import dotenv
dotenv.load_dotenv()
This should be fixed now.
I have created the env in the front of the project but it still have this issue: