Opened 3 years ago
Closed 3 years ago
#64901 closed defect (fixed)
py310-nbconvert @6.1.0_0 calls wrong version of py310-jinja2
Reported by: | AndrewSwann | Owned by: | stromnov (Andrey Stromnov) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | someuser12 | |
Port: | py-nbconvert |
Description
py310-jinja2 has just been updated to version 3.1.0_0, but this breaks py310-nbconvert, with the following error (when tying to create a pdf from jupyterlab)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nbconvert/exporters/html.py", line 14, in <module> from jinja2 import contextfilter ImportError: cannot import name 'contextfilter' from 'jinja2' (/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/jinja2/__init__.py)
since jinja2's contextfilter has changed name to pass_context. evalcontextfilter according to
https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0
Either py310-nbconvert should update to the newest version of nbconvert or
https://github.com/jupyter/nbconvert/issues/1739
suggests pinning to version 3.0.3 og jinja2 should work.
Change History (5)
comment:1 Changed 3 years ago by jmroot (Joshua Root)
Owner: | set to stromnov |
---|---|
Port: | py-nbconvert added |
Status: | new → assigned |
comment:2 Changed 3 years ago by someuser12
comment:3 Changed 3 years ago by someuser12
Cc: | someuser12 added |
---|
comment:5 Changed 3 years ago by reneeotten (Renee Otten)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
This issue also affects jupyter-notebook (which is now unable to open a .ipynb file with the same error message).
I can confirm that upgrading to py-nbconvert 6.4.5 (which has a new dependency to py-beautiful4) solves the problem, at least for jupyter-notebook.