nbconvert: Nbconvert failed index.tex.j2

I followed the instructions in this documentation: https://nbconvert.readthedocs.io/_/downloads/en/5.2.1/pdf/. But when I use jupyter nbconvert --to pdf Mynotebook.ipynb I get the error Screen Shot 2020-11-11 at 20 12 38

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 11
  • Comments: 20 (1 by maintainers)

Most upvoted comments

No it should have templates present in your environment’s share/jupyter/nbconvert/templates/ directory. I just tried a fresh 3.9 venv and didn’t hit any issues installing nbconvert with pip.

I found the templates eventually in my ‘‘C:/users/…/AppData/Roaming/Python/share/jupyter/nbconvert’’. The nbconvert log never specified this path in its degub.

Copy pasting the templates in ‘‘C:/users/…/AppData/Roaming/jupyter/nbconvert’’ solved the issue for me.

I don’t understand why the Roaming/Python/jupyter folder is not found when I launch nbconvert, and vice versa why this Roaming/jupyter folder exists.

No it should have templates present in your environment’s share/jupyter/nbconvert/templates/ directory. I just tried a fresh 3.9 venv and didn’t hit any issues installing nbconvert with pip.

I found the templates eventually in my ‘‘C:/users/…/AppData/Roaming/Python/share/jupyter/nbconvert’’. The nbconvert log never specified this path in its degub.

Copy pasting the templates in ‘‘C:/users/…/AppData/Roaming/jupyter/nbconvert’’ solved the issue for me.

I don’t understand why the Roaming/Python/jupyter folder is not found when I launch nbconvert, and vice versa why this Roaming/jupyter folder exists.

I tried this approach to download pdf via latex but I’m getting the error below:

nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex notebook.tex -quiet" command:
C:\Users\username\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\
ifvtex.sty:170: 
C:\Users\username\AppData\Local\Programs\MiKTeX 2.9\tex/latex/hyperref\hy
perref.sty:2946: Extra 
notebook.tex:66: Extra 
notebook.tex:66: Extra 
notebook.tex:66: Extra 
notebook.tex:66: Extra 
notebook.tex:66: Extra 
^^@:66: Emergency stop

has anyone had the same issue? I think it’s relate to latex itself. Since I could download the zip and run it and compile it on overleaf.