Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flask jinja2.exceptions.TemplateSyntaxError

I'm trying to render a template in Flask but am getting the following errors:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1685, in wsgi_app
    with self.request_context(environ):
  File "/Library/Python/2.7/site-packages/flask/ctx.py", line 274, in __enter__
    self.push()
  File "/Library/Python/2.7/site-packages/flask/ctx.py", line 221, in push
    top.pop()
  File "/Library/Python/2.7/site-packages/flask/ctx.py", line 257, in pop
    self.app.do_teardown_request(exc)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1587, in do_teardown_request
    rv = func(exc)

Not sure what this means, but it looks like it's a framework issue. Does anyone know what I can do to troubleshoot/solve this?

like image 493
locoboy Avatar asked Mar 17 '13 08:03

locoboy


1 Answers

I think the clue is in the exception it is throwing... probably a syntax error in your template. I would try taking out all {{ }} and {% %} tags and adding them back in one by one.

like image 171
aychedee Avatar answered Sep 19 '22 10:09

aychedee