from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello, World!"
I have removed the error by just not saving the file as "flask.py"