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)
![Gavin Ralston](https://secure.gravatar.com/avatar/53016f2c5cfbede63c755ed91895ccfb?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Gavin Ralston
28,770 PointsError: '/' gave a non-200 response.
route in the decorator isn't changed, function name isn't changed, and this appears to fit the challenge terms.
Also having some strange behavior in workspaces, where the flask app was running but I wound up back at the command line and I can't launch it again -- it says the address is already in use. In case that's somehow related.
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/')
@app.route('/<name>')
def index(name="Bob"):
return "Hello {}".format(name)
So if you remove the default for name in index() it responds with non-200 response. If it's set to any value for default, though, I get an unexpected response error.
Any help would be appreciated.
2 Answers
![Kenneth Love](https://uploads.teamtreehouse.com/production/profile-photos/710512/micro_TeacherShoot-Kenneth.jpg)
Kenneth Love
Treehouse Guest TeacherYeah, this challenge is all about the query string.
![Gavin Ralston](https://secure.gravatar.com/avatar/53016f2c5cfbede63c755ed91895ccfb?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Gavin Ralston
28,770 PointsThis task is asking us to import request, so I should have been using request.args.get, not pulling the arguments from the route wrapper.
Gavin Ralston
28,770 PointsGavin Ralston
28,770 PointsOn a completely unrelated note, I'm pretty sure Tron was awesome, so you might want to update your introduction in the logging or pdb video in the Python course to reflect that, sir.
END OF LINE.
Kenneth Love
Treehouse Guest TeacherKenneth Love
Treehouse Guest TeacherTRON was awesome (actually loved both movies). He didn't "shrink down" in TRON, though, he was digitized. :D
Gavin Ralston
28,770 PointsGavin Ralston
28,770 PointsOh yeah! MCP proved that conservation of information doesn't stop even when you're converted to pure energy. So way ahead of string theory.
If it was Inner Space, though, you're dead on.