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.


Chavey Villegas
Chavey Villegas
8,941 Points

jinja2.exceptions.TemplateSyntaxError: tag name expected

I got this error after added all the code to the layout.html file. I still get the error even when I comment out the added code. The only way I can get rid of the error is to remove all the code. Any suggestions?

<!DOCTYPE html> <html> <head> <title>Character Generator</title> <link rel="stylesheet" href="/static/css/normalize.min.css"> <link rel="stylesheet" href="/static/css/main.css"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <div class="wrap no-bottom messages"> {% with messages = get_flashed_messages() %} {% if messages %} <ul class="flashes"> {% for message in messages %} <li>{% {{ message }} %}</li> {% endfor %} </ul> {% endif %} {% endwith %} </div> {% block content %}{% endblock %} </body> </html>