jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.75k stars 568 forks source link

nbconvert --execute --to ipynb doesnt generate an ipynb that renders ipywidgets #1954

Open amcpherson opened 1 year ago

amcpherson commented 1 year ago

Version info:

$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.5.0
ipykernel        : 6.16.0
ipywidgets       : 8.0.2
jupyter_client   : 7.4.2
jupyter_core     : 4.11.1
jupyter_server   : 1.21.0
jupyterlab       : not installed
nbclient         : 0.5.13
nbconvert        : 7.2.1
nbformat         : 5.7.0
notebook         : 6.5.1
qtconsole        : 5.3.2
traitlets        : 5.4.0

If you download this file: https://github.com/jupyter-widgets/ipywidgets/blob/8.0.2/docs/source/examples/Widget%20Basics.ipynb

then run:

jupyter nbconvert --to ipynb --execute Widget\ Basics.ipynb --output testout.ipynb

The resulting notebook testout.ipynb doesnt show widgets. Interactively executing in jupyter notebook does work.

djdjoko commented 5 months ago

I have the same issue, any ideas?