Replies: 4 comments
-
Your sqlalchemy database uri is not being read properly from however you are trying to load it. Looks like maybe an environment variable isn't set. |
Beta Was this translation helpful? Give feedback.
-
I think this is race condition in sqlalchemy, as I hardcoded these
it is solved, but any idea how to delay such that os.getenv("DB_DRIVER") before sqlalchemy is executed? This didn't happen before, or maybe race condition states that it is indeterminate? os.environment["DB_DRIVER"] would be faster? .. [also same] SOLVED: load_env() inside init_engine() But like to know how to bake docker run -e WORKERS_PER_CORE="5" -e PORT="5000" into DOCKERFILE so that docker run -p 5000:5000 my-api-container |
Beta Was this translation helpful? Give feedback.
-
You can check the project generators, they have how to handle that baked in, with retries and everything. You can also copy the parts that you need from them. |
Beta Was this translation helpful? Give feedback.
-
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues. |
Beta Was this translation helpful? Give feedback.
-
Dockerized app was working with Mac fastapi=0.38.1 so not sure what changed now with Win 10 0.39.0:
fastapi: 0.39.0
Dockerfile:
But upon requesting endpoints:
FILE "/usr/local/lib/python3.7/site_packages/sqlalchemy/engine_url.py, line 168" in _get_entrypoint
if "+" not in self.drivername:
TypeError; argument of 'NoneType' is not iterable
Beta Was this translation helpful? Give feedback.
All reactions