from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello, World!"
Asked
Active
Viewed 4.1k times
20

davidism
- 121,510
- 29
- 395
- 339

daddysushant
- 1,001
- 1
- 5
- 7
1 Answers
79
I have removed the error by just not saving the file as "flask.py"

daddysushant
- 1,001
- 1
- 5
- 7
-
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 . – user3126530 Jun 04 '21 at 23:39