Open ConstantineBer opened 2 years ago
Just ran into this tortoise.exceptions.ConfigurationError: Module <x> not found
error myself. Using a debugger, I found out that the problem - at least in my case - was actually not that the module could not be found. The ImportError
raised (which leads to the ConfigurationError
) was in fact hinting towards a problem with circular imports. Weirdly enough I don't get this circular import problem when using the app itself (which runs the same imports), but I do get it when using aerich...
Long story short:
msg
from the ImportError
) as "Module not found" might simply not be the actual problem. I'll raise a pull request later today for this.
I have the problem with aerich configs:
I have the
app/database.py
file with the next content:Also I have a python package with tortoise tables located in
app/models/....
I'm trying to create first migrations file, using the next commands:aerich init -t app.database.TORTOISE_ORM
and I'm getting data inside of mypyproject.toml
:After it I'm trying to run
aerich init-db
, but I'm getting an error: tortoise.exceptions.ConfigurationError: Module "app.models" not found I tried a lot of different variants to change this configs but getting the same error. Version of aerich==^0.6.2 Does everybody know what's wrong?