Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Flask with SQLAlchemy Basics Creating a Basic Website with Flask Create a Flask App

Nataliya Fateeva
seal-mask
.a{fill-rule:evenodd;}techdegree
Nataliya Fateeva
Python Development Techdegree Student 4,673 Points

Another 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:/

app.py
from flask import Flask


app = Flask(__name__)



if name == '__main__':
    app.run(host='0.0.0.0', port=8000)

1 Answer

Yahav Rosner
seal-mask
.a{fill-rule:evenodd;}techdegree
Yahav Rosner
Full Stack JavaScript Techdegree Student 6,409 Points

You 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)