Encountering Jinja2 SyntaxError after adding another css file
K0sh1R1zumu opened this issue · 1 comments
K0sh1R1zumu commented
I've been encountering this confusing error; which is Jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'string'.
This only happened after I added another css file to my html script. But previously, it worked fine.
Here are the previous errors i've encountered regarding this issue:
<link rel="icon" href="{{ url_for('static', filename='images/favicon.png') }}">
jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'static'
<li onclick="redirectUser('/homepage')">Home</li>
jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'string'
Environment:
- Python version: 3.12.4
- Flask version: 3.0.3
ThiefMaster commented
Show the full template. Also double-check that you don't have e.g. typographical quotes instead of the standard '
. Maybe you didn't properly close some previous Jinja tag?