Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![martin Kattam](https://uploads.teamtreehouse.com/production/profile-photos/263282/micro_martin_sqr_min.png)
martin Kattam
Courses Plus Student 14,718 PointsUpdate the response from hello() to say "Hello {name}", replacing {name} with the passed-in name.
Why is this code not passing challenge Challenge Task 2 of 3 from Flask Basics: from flask import Flask. I get a "Bummer! '/' without a name gave a non-200 response."
from flask import Flask
app = Flask(__name__)
@app.route('/<name>')
def hello(name="Treehouse"):
return 'Hello %s' % name
5 Answers
![Hanley Chan](https://secure.gravatar.com/avatar/68e851c8451530490a8a98f4c7846480?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Hanley Chan
27,771 PointsHi,
Step 1 asks to add a new route to hello() instead of overwriting the default. It should work if you put the route back in.
@app.route('/')
![Mike Siwik](https://secure.gravatar.com/avatar/e514dde9d23505fd92b588df245805e4?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Mike Siwik
Front End Web Development Techdegree Student 14,814 Pointsfrom flask import Flask
app = Flask(__name__)
@app.route('/')
@app.route('/<name>')
def hello(name="Steve"):
return 'Hello {}'.format(name)
This is how it should look
![MUZ141140 Dennis Pomerai](https://secure.gravatar.com/avatar/fc2f2891ebfd0584b26dcc80734d6e18?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
MUZ141140 Dennis Pomerai
10,215 Pointsfrom flask import Flask from flask import request
app = Flask(name)
@app.route('/') def index('name'='treehouse'): name = request.args.get('name',name) return "Hello {}".format(name)
![shawn Jones](https://secure.gravatar.com/avatar/360f24cd09d95b78a8e5949ba71af12e?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
shawn Jones
6,044 PointsI'm stuck id did everything and no response from flask import Flask from flask import request app = Flask(name)
@app.route('/') @app.route('/<name>') def index(name="Shawn"): return "Hello {}".format(name)
![Andreas cormack](https://uploads.teamtreehouse.com/production/profile-photos/98061/micro_mypic.jpg)
Andreas cormack
Python Web Development Techdegree Graduate 33,011 Pointshi martin it asks you to add a default route.
from flask import Flask
app = Flask(__name__)
@app.route('/')
@app.route('/<name>')
def hello(name="Treehouse"):
return 'Hello {}'.format(name)
![martin Kattam](https://uploads.teamtreehouse.com/production/profile-photos/263282/micro_martin_sqr_min.png)
martin Kattam
Courses Plus Student 14,718 PointsThanks.
martin Kattam
Courses Plus Student 14,718 Pointsmartin Kattam
Courses Plus Student 14,718 PointsThanks, makes sense now. And it worked.