This is my first flask code and i am getting an error?Can you recognize the errors and tell me the solution

36 Views Asked by At
from flask import Flask 
app=Flask(__name__)

@app.route('/hello/<name>')
def hello(name):
    return 'Hello %s' % name

if __name__=='__main__':
    app.run(debug=True)

Why i am i getting error for this code?

I was expecting Hello Aldous on my browser but got requested url not found

1

There are 1 best solutions below

0
Nayan On

Your code is absolutely correct, just visit this url, http://127.0.0.1:5000/hello/Aldous, I think you are not visiting correct url