Python Forum
Python ModuleNotFoundError: No module named 'sender_model' when running an Alembic mi - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python ModuleNotFoundError: No module named 'sender_model' when running an Alembic mi (/thread-22379.html)



Python ModuleNotFoundError: No module named 'sender_model' when running an Alembic mi - fcardinaliuk - Nov-10-2019

Import modules and packages causing a bit of issues - can anyone identify the main reason for my alembic migration would not run ?

  1. Python VERSION : 3.7.2
  2. I run THE pythons command on WINDOWS The App runs with no problem but the alembic migration will not migrate or upgrade
  3. Also i changed few time modules and packages names.



Here is my project Layout

[Image: Capture.png]



When I run the command
python manage.py db migrate
I get he below error:

Error:
Traceback (most recent call last): File "manage.py", line 3, in from myapp import app, db File "C:\Repositories\sendeasy\app\myapp.py", line 8, in from api.Senders import senders_api File "C:\Repositories\sendeasy\app\api\Senders.py", line 3, in from sender_model import * ModuleNotFoundError: No module named 'sender_model'
Here is the manage.py in the app package.

[Image: manage.png]

here the senders.py in the app/API

[Image: sender.png]

here the sender_model.py in the app/models

[Image: sender-model.png]

and finally here is myapp.py in the app package

[Image: myapp.png]


RE: Python ModuleNotFoundError: No module named 'sender_model' when running an Alembic mi - micseydel - Nov-13-2019

If you're willing to follow Larz60+'s instructions, we're still willing to help :)