简体   繁体   中英

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

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.

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

conda install "nbconvert=5.6.1"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM