tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
820 stars 94 forks source link

Error while importing configuration module: No module named 'app' #188

Closed Reszkettle closed 3 years ago

Reszkettle commented 3 years ago

Following setup: obraz

obraz

I'm prompt with the error in title whenever I want to run aerich migrate

Reszkettle commented 3 years ago

I believe that someone can help me with this matter... because it blocks my development so heavily :(

long2ice commented 3 years ago

You can change config to config.TORTOISE_ORM in aerich.ini depend on your dir struct

Reszkettle commented 3 years ago

@long2ice I've tried it this way but it still does not work, arent there any issues with how path is resolved underneath? im using win10 btw

Reszkettle commented 3 years ago

do you see any other possible problems?

long2ice commented 3 years ago

I'm not sure, you can try move aerich.ini and migrations in root dir then try

Chenger1 commented 3 years ago

Have the same issue. Did you solve it?

Reszkettle commented 3 years ago

@Chenger1 not yet, still trying to find the cause

Chenger1 commented 3 years ago

@Chenger1 not yet, still trying to find the cause

What is your aerich version? I had 0.5.6 with this problem. Try aerich version = 0.5.5. I installed it a few minutes ago and commands work well. Maybe it is a bug in 0.5.6

Reszkettle commented 3 years ago

@Chenger1 I will test it as soon as I arrive home, i think that some PR with reverting those changes will be useful for future use cases

Jarvis1Tube commented 3 years ago

I also tried this on version 0.5.6 and had failure, no module named "app", 0.5.5 verision ok. Recomend to use 0.5.5 for a while.

odi1n commented 3 years ago

I decided to work with aerich, there was the same problem with applications, the version was 0.5.6, I killed a couple of hours to figure out what the problem was. I decided to go to the issue repository, and version 0.5.5 does not have such problems

h25302 commented 3 years ago

https://github.com/tortoise/aerich/issues/189

long2ice commented 3 years ago

Fixed, try latest source code.

Reszkettle commented 3 years ago

@long2ice I've tried to install aerich 0.5.7 but it says that there is no 0.5.7 version and the latest is 0.5.6

Reszkettle commented 3 years ago

@long2ice What I've also noticed is that previously switching back to 0.5.5 was working fine, but now 0.5.5 is not working anymore and it prompts me with me an error:

obraz

long2ice commented 3 years ago

Just run pip install git+https://github.com/tortoise/aerich.git@dev, if no problem after try I will release it.

long2ice commented 3 years ago

released

Reszkettle commented 3 years ago

It does not work still, even in 0.5.7 version

Reszkettle commented 3 years ago

@long2ice What I've also noticed is that previously switching back to 0.5.5 was working fine, but now 0.5.5 is not working anymore and it prompts me with me an error:

obraz

The same problem as above

Reszkettle commented 3 years ago

Okay i was stupid, I just forgot to unpack the list of models... obraz