Using Lektor 2.3; If you have a project with a sitemap (using the template suggested by the Lektor docs):
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in [site.root] if page != this recursive %}
<url><loc>{{ page|url(external=true) }}</loc></url>
{{- loop(page.children) }}
{%- endfor %}
</urlset>
and you have jinja2 2.9 - 2.9.3, in your environment, you get a build error:
(lektor) hammer:pybee.org rkm$ lektor build
Started build
U ar_AR/sitemap.xml
E ar_AR/sitemap.xml (NameError: free variable 'l_1_this' referenced before assignment in enclosing scope)
U sitemap.xml
E sitemap.xml (NameError: free variable 'l_1_this' referenced before assignment in enclosing scope)
U pt_BR/sitemap.xml
E pt_BR/sitemap.xml (NameError: free variable 'l_1_this' referenced before assignment in enclosing scope)
U zh_TW/sitemap.xml
E zh_TW/sitemap.xml (NameError: free variable 'l_1_this' referenced before assignment in enclosing scope)
Downgrading to Jinja2 2.8.1 seems to resolve the problem.
Reporting there because it would seem to be a regression in Jinja2; however, it's also been reported as lektor/lektor#343 in case it's a usage error.
Using Lektor 2.3; If you have a project with a sitemap (using the template suggested by the Lektor docs):
and you have jinja2 2.9 - 2.9.3, in your environment, you get a build error:
Downgrading to Jinja2 2.8.1 seems to resolve the problem.
Reporting there because it would seem to be a regression in Jinja2; however, it's also been reported as lektor/lektor#343 in case it's a usage error.