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)
![Luis Roca](https://secure.gravatar.com/avatar/353ca57aff297be148c00ae3c6cef781?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Luis Roca
2,013 PointsWhat's wrong with my view (app.route) . I don't understand why it isn't running the third task properly. Thanks!
Please help
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Hello Flask"
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=8000)
1 Answer
![Peter Vann](https://uploads.teamtreehouse.com/production/profile-photos/8935412/micro_MaiTaiPeteGravatar.jpg)
Peter Vann
36,426 PointsHi Luis!
The tester for that challenge is just too particular (kind of a 'biatch, in my book LOL)!?!
I had to do boatload of trial-n- error to get it right!
The "Bummer" hints are not very helpful in this challenge.
Sometimes I have NO IDEA what the challenge is asking for until I get it right or look up the answer somewhere else (or consult the forums, like you did).
Syntax is generally so arbitrary that I can't understand much of it without seeing several correct/exact examples.
Without many great/accurate examples, many tutorials are useless. A lot leave out critical details without which you can't code it correctly. For example, I took the OWASP course, which was good. but it's missing a lot of critical details about how to implement it - they show a lot of code samples, but not where it goes. (On the client? On the server? In which file? Do I have to do it? Or do I have to involve my hosting provider's tech support, etc.?!? It can get very frustrating.) Unfortunately, I usually have to consult copious 3rd-part resources to fully grasp much of the material.
This passes all three:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Hello Flask"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)
The double spacing between lines helped as did not putting dunder name in quotes!?!
Like this (you had it right):
__name__ instead of '__name__'
I also got rid of "debug=True" in the app.run statement.
I hope that helps.
Stay safe and happy coding!
Luis Roca
2,013 PointsLuis Roca
2,013 PointsPeter, you're a star! Thanks!