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 trialTravers Geoffray
Python Development Techdegree Graduate 26,967 PointsSays "don't forget a couple of empty lines before the dunder main." What am I doing wrong here?
I've tried adding more lines, retyping it, etc.
# insert your code here
from flask import Flask
app = Flask(__name__)
if name == '__main__':
app.run(debug = True, port = 8000, host = '0.0.0.0')
1 Answer
Megan Amendola
Treehouse TeacherHi! Make sure to follow the code challenge prompts. It's asking for you to add the dunder main with a port and host but it is not asking for the debug. That's what is throwing you off :)
if __name__ == "__main__":
app.run(port = 8000, host = "0.0.0.0")
Travers Geoffray
Python Development Techdegree Graduate 26,967 PointsTravers Geoffray
Python Development Techdegree Graduate 26,967 PointsAh, got it! Thank you! Just noticed I forgot to put the dunder on name too...