lab-cosmo/librascal

CircleCI doc test fails "has no attribute 'tags'"

agoscinski opened this issue · 5 comments

Hello, I have this error in my branch, which seems not limited to my branch. It also happens when I undo all changes to the notebook

Notebook error:
UndefinedError in examples/zundel_i-PI.ipynb:
'nbformat.notebooknode.NotebookNode object' has no attribute 'tags'
docs/CMakeFiles/doc.dir/build.make:57: recipe for target 'docs/CMakeFiles/doc' failed
make[3]: *** [docs/CMakeFiles/doc] Error 2
CMakeFiles/Makefile2:1256: recipe for target 'docs/CMakeFiles/doc.dir/all' failed
make[2]: *** [docs/CMakeFiles/doc.dir/all] Error 2
CMakeFiles/Makefile2:1268: recipe for target 'docs/CMakeFiles/doc.dir/rule' failed
make[1]: *** [docs/CMakeFiles/doc.dir/rule] Error 2
Makefile:591: recipe for target 'doc' failed
make: *** [doc] Error 2

https://app.circleci.com/pipelines/github/cosmo-epfl/librascal/2515/workflows/8a4a5e50-bd34-4754-a6ac-9a3756083475/jobs/21487

Haven't investigated it yet, but maybe someone already has a solution for this

I'm seeing this now, too. It worked just fine until I upgraded Sphinx from version 3.5.3 to 4.0.1, but on reverting to the previous version I still have the error. Unfortunately I don't have a working installation anymore, otherwise I'd freeze the conda environment and make sure to use all the "working" versions of those packages from now on (I'm utterly sick of these weird bugs brought in by random upstream changes).

looks like the last successful doc build (5 days ago) was with this configuration:

Successfully installed Jinja2-2.11.3 MarkupSafe-1.1.1 Send2Trash-1.5.0 alabaster-0.7.12 appdirs-1.4.4 argon2-cffi-20.1.0 ase-3.21.1 async-generator-1.10 attrs-21.2.0 babel-2.9.1 backcall-0.2.0 black-20.8b1 bleach-3.3.0 breathe-4.30.0 certifi-2020.12.5 cffi-1.14.5 chardet-4.0.0 click-8.0.1 coverage-5.5 cpplint-1.5.5 cycler-0.10.0 dataclasses-0.8 decorator-5.0.9 defusedxml-0.7.1 docutils-0.16 entrypoints-0.3 imagesize-1.2.0 importlib-metadata-4.0.1 iniconfig-1.1.1 ipykernel-5.5.5 ipython-7.16.1 ipython-genutils-0.2.0 ipywidgets-7.6.3 jedi-0.18.0 jsonschema-3.2.0 jupyter-1.0.0 jupyter-client-6.2.0 jupyter-console-6.4.0 jupyter-core-4.7.1 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.0 kiwisolver-1.3.1 matplotlib-3.3.4 mistune-0.8.4 mpmath-1.2.1 mypy-extensions-0.4.3 nbclient-0.5.3 nbconvert-6.0.7 nbformat-5.1.3 nbsphinx-0.8.5 nbval-0.9.6 nest-asyncio-1.5.1 notebook-6.4.0 numpy-1.19.5 packaging-20.9 pandocfilters-1.4.3 parso-0.8.2 pathspec-0.8.1 pexpect-4.8.0 pickleshare-0.7.5 pillow-8.2.0 pluggy-0.13.1 prometheus-client-0.10.1 prompt-toolkit-3.0.18 ptyprocess-0.7.0 py-1.10.0 py-ubjson-0.16.1 pycparser-2.20 pygments-2.9.0 pyparsing-2.4.7 pyrsistent-0.17.3 pytest-6.2.4 python-dateutil-2.8.1 pytz-2021.1 pyzmq-22.0.3 qtconsole-5.1.0 qtpy-1.9.0 regex-2021.4.4 requests-2.25.1 scipy-1.5.4 snowballstemmer-2.1.0 sphinx-4.0.1 sphinx-rtd-theme-0.5.2 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.4 terminado-0.10.0 testpath-0.5.0 toml-0.10.2 tornado-6.1 traitlets-4.3.3 typed-ast-1.4.3 typing-extensions-3.10.0.0 urllib3-1.26.4 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.5.1 zipp-3.4.1

Maybe there's a way to get a Conda environment configuration out of this and upgrade packages, one at a time, until the excrement hits the rotary ventilation device. Then at least we see which package is responsible.

this is just... *facepalms*. The change was an update to the jinja2 template parsing system, which broke some code in nbsphinx when it encountered notebooks (like ours) that don't have these tags attributes (see here for the likely source of the problem). I think we can safely classify this as an upstream issue, which we could probably even bring to the npsphinx maintainers' attentions, seeing as they were possibly relying on unsupported/undefined behaviour.

Not easily... from what I can tell, this is an attribute of each Markdown cell that it's looking for (and not finding, even with the latest Jupyter notebook format -- meaning the latest Jupyter doesn't write out this attribute by default). The quick-fix will have to do until we have an upstream fix.