0

I recently cloned a code from Gitlab on my PC and I'm getting this error

ModuleNotFoundError: No module named 'models'

At this line

from models import *

The file that contains this line is in a directory called interfaces at the same level with models.

---apps
    ---interfaces
        test.py
    ---models

My colleagues cloned the code and they didn't have this problem. What is going on my side?

I am using Python 3.6.8 and Pycharm 2022.1.4 (Community Edition) and it's a Flask project.

Edit: when I do this, the error disappears:

from app.models import *

1 Answer 1

0

The problem was with my Pycharm. I had to right click on the "app" folder and mark it as Sources Root

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.