添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I need help here. My Python app was working just fine, but when it restarted I got this error. I didn’t change anything in my code. Can anyone help me to fix this? Thanks

Traceback (most recent call last):
  File "nina.py", line 4, in <module>
    from models.course import Course
  File "/home/runner/TA/venv/lib/python3.10/site-packages/models/__init__.py", line 3, in <module>
    from redberry.blueprint import cms
  File "/home/runner/TA/venv/lib/python3.10/site-packages/redberry/blueprint.py", line 4, in <module>
    from flask.ext.login import current_user
ModuleNotFoundError: No module named 'flask.ext'

The above suggestions didn’t work, but I have already figure it out and fixed it!. The problem was that I have a folder named models in my app, and when I was importing files from this folder it was throwing the error because it looks like the name “model” is reserved. I renamed the folder and now it works!

Thank you for your suggestions.