incf-nidash / nidm-specs

Neuroimaging Data Model (NIDM): describing neuroimaging data and provenance
nidm.nidash.org
Other
33 stars 30 forks source link

Error when updating the website #461

Closed cmaumet closed 6 years ago

cmaumet commented 6 years ago

This issue was identified by @khelm. When updating the online version of the website, we get the following error:

$ fab serve
[localhost] local: rm -rf output
[localhost] local: mkdir output
[localhost] local: pelican content/ -s pelicanconf.py
WARNING: Feeds generated without SITEURL set properly may not be valid
ERROR: Skipping specs/README.md: could not find information about 'title'
WARNING: There are 1 items with empty slug: 
  | /Users/camaumet/Softs/nidm-specs/doc/content/pages/home.md
CRITICAL: UndefinedError: '_' is undefined

Fatal error: local() encountered an error (return code 1) while executing 'pelican content/ -s pelicanconf.py'

I've tried with both Python 2 and Python 3 and get the same error.

From what I can see this is a problem with the theme that we are using for the website (i.e. if I comment out # THEME = 'pelican-bootstrap3 in pelicanconf.py the error goes away but we loose all the nice formatting...).

Help would be greatly appreciated

khelm commented 6 years ago

@cmaumet - Got rid of the error by: 1) git clone https://github.com/getpelican/pelican-plugins.git pelican-plugins 2) pip install jinja2 -U (to 2.10) 3) pip install fabric -U (to 2.1.3) 4) pip install python-gettext

added the following lines to pelicanconf.py

PLUGIN_PATHS = ['/path/to/pelican-plugins', ]
PLUGINS = ['i18n_subsites', ]
JINJA_ENVIRONMENT = {
    'extensions': ['jinja2.ext.i18n'],
}

A problem is that I couldn't use a relative path to point to the pelican-plugins directory. We'll have to discuss how to deal with this. I also got rid of the warnings by adding

Title:
Date:

to /specs/README.md and

Slug:

to .../nidm/nidm/doc/content/pages/home.md

In figuring this out, I found that updating fabric completely breaks fabfile.py as ver2.x is not backward compatible to ver1.0, so I have also updated fabfile.py for fabric ver2.x.

cmaumet commented 6 years ago

This issue was fixed by @khelm in https://github.com/incf-nidash/nidm-specs/pull/467. Thanks!