nbsphinx: Jinja2 update to version 3 breaks nbsphinx
As Jinja2 version is not frozen to 2.11 in setup.py nbsphinx uses the new version 3.0.0.
With Jinja2 3.0.0 I’ve been getting the following error for all notebooks
'nbformat.notebooknode.NotebookNode object' has no attribute 'tags'
This does not happen if I freeze Jinja2 to 2.11.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 14
- Comments: 18 (6 by maintainers)
Commits related to this issue
- Update to latest version of nbsphinx to handle spatialaudio/nbsphinx#563 — committed to sustainable-processes/summit by marcosfelt 3 years ago
- Prevent naming variables keywords (#138) Updated pretrained benchmarks and doctests to reflect changes. Also update nbsphinx to handle spatialaudio/nbsphinx#563 — committed to sustainable-processes/summit by marcosfelt 3 years ago
- change nbpshinx version in docs to fix UndefinedError In docs, nbsphinx 0.8.1 had a known issue with jinja2 in the conversion of .ipynb files to docs. More details about this issue here: https://git... — committed to ks905383/xagg by ks905383 3 years ago
- update nbsphinx version in setup.py https://github.com/spatialaudio/nbsphinx/issues/563 — committed to NREL/rdtools by mdeceglie 3 years ago
- Update requirements files (#275) * bump numpy version to handle windows compat issue * bump pygments and jinja2 using dependabot reccs * add missing indirect dependencies to requirements.txt ... — committed to NREL/rdtools by kandersolar 3 years ago
- update version of nbsphinx fixes the 'nbformat.notebooknode.NotebookNode object' has no attribute 'tags' build error that we were seeing when we tried to build on Read The Docs. (see https://github.... — committed to eberharf/cfl by jmkahn 3 years ago
- Freeze jinja2 to version `2.11.2`, otherwise nbsphinx breaks in the docker image (see https://github.com/spatialaudio/nbsphinx/issues/563). — committed to simphony/docs by kysrpex 3 years ago
- Freeze jinja2 to version `2.11.2` Freeze jinja2 to version `2.11.2`, otherwise nbsphinx breaks in the docker image (see https://github.com/spatialaudio/nbsphinx/issues/563). — committed to simphony/docs by kysrpex 3 years ago
- don't pin pip for docs environment see discussion here: https://github.com/spatialaudio/nbsphinx/issues/563 — committed to LabForComputationalVision/plenoptic by billbrod 3 years ago
- Pin Jinja2==2.11 to work around RTD build breakage. This fixes the issue for folks with similar breakages (e.g. spatialaudio/nbsphinx#563). Example: https://readthedocs.org/projects/dm-haiku/builds/... — committed to google-deepmind/dm-haiku by tomhennigan 3 years ago
- Pin Jinja2==2.11 to work around RTD build breakage. This fixes the issue for folks with similar breakages (e.g. spatialaudio/nbsphinx#563). Example: https://readthedocs.org/projects/dm-haiku/builds/... — committed to google-deepmind/dm-haiku by tomhennigan 3 years ago
- setup.py: Freeze jinja2 version to avoid breaking nbformat Avoid issue: https://github.com/spatialaudio/nbsphinx/issues/563 — committed to douglas-raillard-arm/lisa by douglas-raillard-arm 3 years ago
- setup.py: Freeze jinja2 version to avoid breaking nbformat Avoid issue: https://github.com/spatialaudio/nbsphinx/issues/563 — committed to douglas-raillard-arm/lisa by douglas-raillard-arm 3 years ago
- setup.py: Freeze jinja2 version to avoid breaking nbformat Avoid issue: https://github.com/spatialaudio/nbsphinx/issues/563 — committed to ARM-software/lisa by douglas-raillard-arm 3 years ago
- bump nbsphinx - fixes 'nbformat.notebooknode.NotebookNode object' has no attribute 'tags' https://github.com/spatialaudio/nbsphinx/issues/563 — committed to J-RN/j-rn-action by casperdcl 3 years ago
- bugfix See https://github.com/spatialaudio/nbsphinx/issues/563 — committed to rodluger/starry_process by rodluger 3 years ago
- froze jinja to version 2.x as update to version 3.0 breaks nbsphinx (https://github.com/spatialaudio/nbsphinx/issues/563) — committed to TRON-Bioinformatics/neofox by priesgo 3 years ago
- Update doc.yml https://github.com/spatialaudio/nbsphinx/issues/563 — committed to euroargodev/argopy by gmaze 3 years ago
- Release 2.1.0 (#289) * Model chains (#117) * Add normalized_filter() function to replace the mannual filter in example * Initial working system analysis class * system analysis version that ... — committed to NREL/rdtools by mdeceglie 3 years ago
- Drop python 3.6; add python 3.10; update requirements-min (#302) * Model chains (#117) * Add normalized_filter() function to replace the mannual filter in example * Initial working system analy... — committed to NREL/rdtools by kandersolar 2 years ago
Thanks @astrojuanlu for testing!
I’ve just released version 0.8.6 with a fix for this issue.
Tested with
nbsphinx==0.8.6
andjinja2=3.0.1
. Python 3.8.7Also published to ReadTheDocs https://aiqc.readthedocs.io/en/latest/notebooks/heterogeneous_features.html successfully if you want to inspect anything.
Thanks for the fix in #564! I’ve merged it and I’ve just made a new release https://pypi.org/project/nbsphinx/0.8.5/.
If anybody has an idea how to fix the root cause of the problem, please let me know!
Just wanted to add that I am only seeing this bug for pip version 20.2 (well, specifically 20.2.4). Using
pip>=20.3.0
also solves the problem.I’m not sure exactly what changed to cause this, but pip 20.3 made a load of changes to the resolver, so presumably it’s one of the ones listed here: https://pip.pypa.io/en/stable/news/#v20-3