Replies: 2 comments
-
I faced similar problem trying to debug my FastAPI project. When uvicorn server is launched like this:
with specified After some time trying to fix it, I have found the culprit. I think if terminal session has environment variables uvicorn will use them regardless of specified .env file. So after changing the .env file, restarting of terminal is required to load new values. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Initial Checks
Discussion Link
Description
When passing a
.env
file with theuvicorn.run
command it does not properly pass its information on to the uvicorn and FastAPI application.Example Code
.env file
Test Cases
Incorrect Output
Correct Output
Python, Uvicorn & OS Version
Important
Beta Was this translation helpful? Give feedback.
All reactions