nbconvert
nbconvert copied to clipboard
Export in html_toc - produces buggy html output
Hi,
PROBLEM
there is long-term problem, that is is not possible to export notebook in html_toc format in Jupyterlab.
- First, there was long-term problem with versions mismatch between jupyter-contrib-nbextensions versus nbconvert
- see https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1529
- and now there is problem with nbconvert itself
- when exporting in html_toc format, it exports string None, instead of Table of Contents.
SEE PROBLEM OUTPUT
To see the problem, I am attaching both files:
- input file -
test.ipynb
- output html file -
test.html
- you can see, there is text None, instead of the Table of Content
Both files in attached zip: test.zip
REPRODUCE
- Just install basic python with jupyterlab 3.4.5
- plus run 3 lines below:
pip install git+https://github.com/ipython-contrib/jupyter_contrib_nbextensions.git
pip install git+https://github.com/jfbercher/jupyter_latex_envs.git
jupyter contrib nbextension install --user
- run Jupyterlab and try export any notebook from menu File / Export notebook / html_toc
LIB VERSIONS
- Nbconvert version: 6.5.3
- jupyterlab: 3.4.5
- jupyter-contrib-nbextensions: 0.6.0
@minrk @jdfreder @Carreau
Could any of you guys please take a look at this?
I guess you mean the toc2 extension for Jupyter classic, not Jupyterlab ?
The template_path
issue with nbextensions has been fixed recently. There is an updated version of jupyter-nbextensions-configurator
on PyPi, we are still working on providing an updated conda package.
Unfortunately, the html exported toc depends on files provided by a CDN (https://min.gitcdn.xyz) in the toc2.tpl
export template. This seems to be down, making it hard to get the exporter working again.
If there is a replacement for the CDN, it will be easy to fix the toc2 exporter.
I guess you mean the toc2 extension for Jupyter classic, not Jupyterlab ?
I mean only new modern Jupyterlab (which is started by command: jupyter lab
)
- I am not using the old classic Jupyter (started by command:
jupyter notebook
) at all.
I'm experiencing this too, and it seems to be across the community.
- jupyter nbconvert --to html_toc not working
- How to solve error with downloading Jupyter Notebook as HTML with toc?
Many solutions recommend pip install "nbconvert<6"
, but the responses have said that the downgrade is impossible which has been my experience trying to get this to work.
Is there any development on the problem? It seams there is no way to convert to html with toc with nbconvert>=6
?
Looks like nobody can solve it. It is a long-term issue. I started using quarto.org for exporting notebooks and it is really excellent - much better than original HTML_TOC.