目 录CONTENT

文章目录

ImportError: cannot import name 'db' from partially initialized module most likely due to a circular import

大T
2021-06-07 / 0 评论 / 0 点赞 / 80 阅读 / 0 字
Flask SQLAlchemy报错: ImportError: cannot import name 'db' from partially initialized module 'run' (most likely due to a circular import) (F:\project-python-dev\TimeAccount\run.py)  
解决办法: 导入包的顺序不对,todolist中用到db了,所以应该把todolist放在db后边导入
调整后如下图,重启,可以正常运行。
0

评论区