question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnitTests errors: jinja2.exceptions.TemplateSyntaxError: tag name expected

See original GitHub issue

Hello,

I’m working in getting your package into Debian archive but on ma machine 16 unittests are failing, all related to jinja2 with the same error, e.g:

self = <jinja2.parser.Parser object at 0x7ff080b08b38>, msg = 'tag name expected', lineno = 2, exc = <class 'jinja2.exceptions.TemplateSyntaxError'>

    def fail(self, msg, lineno=None, exc=TemplateSyntaxError):
        """Convenience method that raises `exc` with the message, passed
        line number or last line number as well as the current name and
        filename.
        """
        if lineno is None:
            lineno = self.stream.current.lineno
>       raise exc(msg, lineno, self.name, self.filename)
E       jinja2.exceptions.TemplateSyntaxError: tag name expected

/usr/lib/python3/dist-packages/jinja2/parser.py:59: TemplateSyntaxError

Any idea ?

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
eLvErDecommented, Dec 2, 2020

Confirmed, cc9b746b5fc1de4090c46316b734adc0acd94678 restored jinja2 2.10 compat, thanks for the quick fix.

Also thanks for this library, I don’t know yet how I’ll use it but I have some work to do with very complex XSD and it generated typed dataclasses for it perfectly fine so it’ll probably make my job a lot easier 😄

0reactions
eLvErDecommented, Dec 2, 2020

You might want to setup a couple of CI profiles using versions from common distributions, e.g: Ubuntu 18.04/20.04, Debian 10, CentOS 8, that could help spotting regression like this

Read more comments on GitHub >

github_iconTop Results From Across the Web

python ternary in jinja2 gives TemplateSyntaxError: tag name ...
storyPublished else ' ' %}" > <td> {{ person.name }} </td> ... I get this error: jinja2.exceptions.TemplateSyntaxError TemplateSyntaxError: tag ...
Read more >
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...
Read more >
Automation - (TemplateSyntaxError: tag name expected)
Hello there! I am trying to automate a daylight alarm clock. It should read the next alarm comig up at my phone and...
Read more >
Cannot use the plus sign(+) for whitespace control: tag name ...
TemplateSyntaxError : tag name expected ... lstrip_blocks = False, the syntax "{%+ statement %}" fails with error message "jinja2.exceptions.
Read more >
[Solved] My error is: jinja2.exceptions.templatesyntaxerror ...
My error is: jinja2. exceptions. templatesyntaxerror: encountered unknown tag 'end'. Jinja was looking for the following tags: 'endif'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found