tomasrasymas/flask-restful-api-template

circular import in users/resource.py

zengyee opened this issue · 1 comments

when run the project with following command, got import errors:

python3 app.py -m flask run --host=0.0.0.0

error message:

ImportError: cannot import name 'UsersResource' from partially initialized module 'endpoints.users.resource' (most likely due to a circular import) (/home/jeff/Desktop/flask-restful-api-template-master/endpoints/users/resource.py)

not repro for python3 manage.py runserver

Same issue as above! @zengyee I created a db.py file initializing db to solve this issue.