I just finished the Flask basic tutorial (here) and even though I\'ve done completed every step, when I am trying
python flaskr.py
what I get
Happened to me also while following Flask Application Setup here . The error was gone after appending a trailing slash at the end of the route.
@app.route('/hello')
def hello():
return 'Hello, World!'
was changed to
@app.route('/hello/')
def hello():
return 'Hello, World!'
and the problem was solved. Hope it helps for anyone who is searching for a problem like this.