ImportError: cannot import name 'Flask' from partially initialized module 'flask' (most likely due to a circular import)

20,738

I have removed the error by just not saving the file as "flask.py"

Share:
20,738

Related videos on Youtube

Author by

daddysushant

Updated on April 05, 2020

Comments

  • daddysushant over 2 years
    from flask import Flask
    app = Flask(__name__)
    @app.route("/")
    def hello():
        return "Hello, World!"
    
  • user3126530
    user3126530 over 1 year
    Yes the issue is that flask.py naming convention and Import flask command are causing this issue whereas if youu run this code in jupyter notebook without saving the notebook or keeping some other name will work .

Related