from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello, World!"
Asked
Active
Viewed 2.4k times
12
davidism
- 110,080
- 24
- 357
- 317
daddysushant
- 681
- 1
- 4
- 7
1 Answers
55
I have removed the error by just not saving the file as "flask.py"
daddysushant
- 681
- 1
- 4
- 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