You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "C:\Users\ychebyshev\PycharmProjects\Shvatka\shvatka\tgbot\middlewares\init_middleware.py", line 67, in __call__
data["file_gateway"] = await request_dishka.get(FileGateway) # type: ignore[type-abstract]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ychebyshev\AppData\Local\pypoetry\Cache\virtualenvs\shvatka-7O9jFSMq-py3.11\Lib\site-packages\dishka\async_container.py", line 114, in _get_unlocked
raise ValueError(f"No provider found for {dependency_type!r}")
ValueError: No provider found for <class 'shvatka.infrastructure.db.dao.holder.HolderDao'>
in line 66 i've just received HolderDao. it was incomprehensible error.
Isolved it, when found that dao is in REQUEST scope and FileGateway is in APP scope (that was my mistake, both should be in REQUEST scope)
if I've forgot scope i received this error
please add to error provider name (and will be greate if method name or provided type for case with really many
@provide
functiuons in one provider)if I created sync container and add async provider i receive next error:
will be greate to add to error why (wrong type of container)
The text was updated successfully, but these errors were encountered: