ImportError: cannot import name

后端 未结 4 2093
余生分开走
余生分开走 2020-12-08 14:24

I have two files app.py and mod_login.py

app.py

from flask import Flask
from mod_login import mod_login

app = Flask(__name         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-08 14:34

    This can also happen if you've been working on your scripts and functions and have been moving them around (i.e. changed the location of the definition) which could have accidentally created a looping reference.

    You may find that the situation is solved if you just reset the iPython kernal to clear any old assignments:

    %reset
    

    or menu->restart terminal

提交回复
热议问题