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 trialNataliya Fateeva
Python Development Techdegree Student 4,858 PointsAnother issue with objective
Seriously guys, what is wrong with your detection of empty lines here???
Traceback (most recent call last): File "", line 14, in test_init_code AssertionError: Regex didn't match: '[\r\n]{2,}if\s+\\_name\_\_' not found in "from flask import Flask\n\n\napp = Flask(name)\n\n\n\nif name == 'main_':\n app.run(host='0.0.0.0', port=8000)" : Don't forget to add a couple empty lines before your dunder main
maybe stop trying to check these with a regexp:/
from flask import Flask
app = Flask(__name__)
if name == '__main__':
app.run(host='0.0.0.0', port=8000)
1 Answer
Yahav Rosner
Full Stack JavaScript Techdegree Student 6,415 PointsYou had a small typo, this is what you should write:
from flask import Flask
app = Flask(__name__)
if '__name__' == '__main__':
app.run(host='0.0.0.0', port=8000)