Fixing Warnings in Pelican

Posted on 12 Dec 2017 in Full-Stack Web Development • 1 min read


In this article, I'll document warnings that I've encounter so far.

Warning after Pelican 3.7.0 update

The previous Pelican 3.7.0 release brings some changes. The release log lists all the changes which also mentions that JINJA_EXTENSIONS is replaced with JINJA_ENVIRONMENT in the pelicanconf.py file.

  • WARNING: JINJA_EXTENSIONS setting has been deprecated, moving it to JINJA_ENVIRONMENT setting. To avoid this warning I replace the line

    JINJA_EXTENSIONS = ['jinja2.ext.i18n']
    

    with this

    JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
    

Other Warnings

  • WARNING: Locale could not be set. Check the LOCALE setting, ensuring it is valid and available on your system. This warning can be avoid by defining the LOCALE variable in the pelicanconf.py file. As an example:
    LOCALE = ('en_GB', 'de_DE')