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 trialVanessza Koos
555 PointsHi, I got this error message: Bummer: '/' gave a non-200 response. Did you change the route? Anybody any idea?
Hi, I got this error message: Bummer: '/' gave a non-200 response. Did you change the route? Anybody any idea what is the problem?
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/')
def index(name):
return "Hello {}".format(name)
1 Answer
Christian Beckett
11,123 PointsOr in my opinion it should look something like this
from flask import Flask
from flask import request
app = Flask(__name__)
app.route('/')
def index(name='Christian'):
name = request.args.get('name', name)
return 'Hello {}!'.format(name)
Good luck on your python adventure. Hope this helps some :3 Vanessza Koos
Vanessza Koos
555 PointsThank you :)))
Christian Beckett
11,123 PointsYour welcome sorry it took me a while to answer. I'm learning python frameworks myself so if you need help please just ping me i will help Vanessza Koos
Vanessza Koos
555 PointsAll right I'll thank you!
Tapiwanashe Jandura
2,677 PointsThank you
Christian Beckett
11,123 PointsChristian Beckett
11,123 PointsHi Vanessza. It looks to me like you just looked over something wrong. look at it again Vanessza Koos :P