You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When {% jinja expr %}.jinja imports a macro using 'from "macro_file.jinja" import my_macro' syntax, Environment.render fails with SyntaxError: f-string: invalid syntax error message.
Internally jinja concatenates the importing template filename into an f-string, which results with invalid f-string:
ifl_0_print_heloismissing:
l_0_print_helo=undefined(f"the template {included_template.__name__!r} (imported on line 1 in '{%ifTrue%}a{%endif%}.txt.jinja') does not export the requested name 'print_helo'", name='print_helo')
Couldn't reproduce the error using import "macro_file.jinja" as m syntax.