How to solve error with downloading Jupyter Notebook as HTML with toc?

Viewed 5250

When I try to download jupyter notebook as HTML with ToC, it gives a

500 Internal Server Error: nbconvert failed: toc2

I have tried to reinstall nbextensions, upgrade notebook, and tried to download notebook with the File>>Download As method and the command method, all with no luck.

jupyter nbconvert --to html_toc names.ipynb

gives the following error

File "C:\Users\Elle\miniconda3\lib\site-packages\jinja2\loaders.py", line 429, in load
    raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: toc2

I was able to download as HTML, but unable to do so with ToC. The toc2 folder is in \miniconda3\share\jupyter\nbextensions. The toc2.tpl is in \miniconda3\Lib\site-packages\jupyter_contrib_nbextensions\templates

I am not sure what steps I should follow to have this work.

1 Answers

After googling, I fixed it by downgrading nbconvert to version 5.6.1

conda install "nbconvert=5.6.1"
Related