Description
hi, I cloned the git-master code and try to run the example without any modification in my miniconda environment where python version is 3.8.11, but the example “fastapi-sqlalchemy” cannot be executed.
The error message is "TypeError: 'ABCMeta' object is not subscriptable".
related environment is
uvicorn 0.15.0
fastapi 0.68.1
dependency-injector 4.36.0
how to fix it ?
Thanks !
fastapi-sqlalchemy % python -m webapp.application
Traceback (most recent call last):
File "/Users/zoo/miniconda3/envs/gui/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/zoo/miniconda3/envs/gui/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/zoo/Downloads/python-dependency-injector-master/examples/miniapps/fastapi-sqlalchemy/webapp/application.py", line 5, in
from .containers import Container
File "/Users/zoo/Downloads/python-dependency-injector-master/examples/miniapps/fastapi-sqlalchemy/webapp/containers.py", line 5, in
from .database import Database
File "/Users/zoo/Downloads/python-dependency-injector-master/examples/miniapps/fastapi-sqlalchemy/webapp/database.py", line 16, in
class Database:
File "/Users/zoo/Downloads/python-dependency-injector-master/examples/miniapps/fastapi-sqlalchemy/webapp/database.py", line 32, in Database
def session(self) -> Callable[..., AbstractContextManager[Session]]:
TypeError: 'ABCMeta' object is not subscriptable