Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'User' from partially initialized module 'models' (most likely due to a circular import) (/app/models.py) #29

Open
5t33 opened this issue Sep 3, 2022 · 0 comments

Comments

@5t33
Copy link

5t33 commented Sep 3, 2022

When attempting to run the app via python app.py I get the following error:

python app.py 
Traceback (most recent call last):
  File "app.py", line 25, in <module>
    from models import User  # noqa
  File "/app/models.py", line 1, in <module>
    from app import db
  File "/app/app.py", line 25, in <module>
    from models import User  # noqa
ImportError: cannot import name 'User' from partially initialized module 'models' (most likely due to a circular import) (/app/models.py)

I'm working on a fix. Shouldn't be too complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant