I have installed a clear version of Python 3.6 and ran the following $ pip install notebook to install jupyter on my Windows machine.
When I try to download my notebook as PDF via LaTeX I receive the following error:

nbconvert was installed as a dependency with jupyter. Furthermore, I have MikTex installed for LaTeX.
Worth mentioning, I have tried this with different python versions and on my Mac as well.
Hopefully someone could shed some light on this error.
Originally opened as jupyter/nbconvert#697 by @MustiDarsh, migration requested by @mpacer
@mpacer commented: Does the Mac have the same error?
what version of notebook and nbconvert do you have?
@MustiDarsh commented: @mpacer
Yes, I receive the same error on my Mac.
The version of my notebook is: 5.2.0 and nbconvert: 5.3.1
Furthermore, these are all the packages installed in my python environment:
appdirs (1.4.3)
beautifulsoup4 (4.6.0)
bleach (2.1.1)
bs4 (0.0.1)
certifi (2017.4.17)
chardet (3.0.4)
colorama (0.3.9)
cssselect (1.0.1)
decorator (4.1.2)
entrypoints (0.2.3)
html5lib (1.0b10)
idna (2.5)
ipykernel (4.6.1)
ipython (6.2.1)
ipython-genutils (0.2.0)
ipywidgets (7.0.3)
jedi (0.11.0)
Jinja2 (2.9.6)
jsonschema (2.6.0)
jupyter-client (5.1.0)
jupyter-console (5.2.0)
jupyter-core (4.3.0)
lxml (3.8.0)
MarkupSafe (1.0)
mistune (0.7.4)
nbconvert (5.3.1)
nbformat (4.4.0)
notebook (5.2.0)
packaging (16.8)
pandocfilters (1.4.2)
parso (0.1.0)
pickleshare (0.7.4)
pip (9.0.1)
prompt-toolkit (1.0.15)
Pygments (2.2.0)
pyparsing (2.2.0)
python-dateutil (2.6.1)
pyzmq (16.0.2)
qtconsole (4.3.1)
requests (2.17.3)
setuptools (28.8.0)
simplegeneric (0.8.1)
six (1.10.0)
testpath (0.3.1)
tornado (4.5.2)
traitlets (4.3.2)
urllib3 (1.21.1)
wcwidth (0.1.7)
webencodings (0.5.1)
wheel (0.29.0)
widgetsnbextension (3.0.6)
The error is the same in python 2.7.13, 2.7.14, 3.5.4 and 3.6.
@mpacer commented: That is… really really strange. I have no idea why that would be, does it have issues for any of the other exporters?
@mpacer commented: ok I think this relates to some changes that were made in notebook version 5.2… not anything having to do with nbconvert.
For now I'd recommend running jupyter nbconvert Untitled.ipynb --to pdf from the command line.
@MustiDarsh commented: @mpacer so if I install an earlier version of notebook, for instance 5.1 or 5.0 will the problem be resolved?
And should I downgrade any of the dependencies as well?
Ok… tracked down the problem!
@takluyver @gabyx what was the aim in passing in "path" to the resources metadata? I don't think it has the meaning that you intended
https://github.com/jupyter/notebook/commit/f5e9e2ed415e8c12e35546e73f6285c82c9a8159
https://github.com/jupyter/notebook/commit/2056b1ba6fe3bf44a26a180980b6b6a766b2e1a0
Path is used by nbconvert to communicate the directory in which various events are supposed to occur:
see this code
path, basename = os.path.split(filename)
notebook_name = basename[:basename.rfind('.')]
resources['metadata']['name'] = notebook_name
resources['metadata']['path'] = path
You are passing it in as the actual file that is being converted, which is causing this error. A fix PR is on its way.
This works for me (for Debian/Ubuntu):
sudo apt-get install texlive-xetex
https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex
This works for me (for Debian/Ubuntu):
sudo apt-get install texlive-xetexhttps://nbconvert.readthedocs.io/en/latest/install.html#installing-tex
Worked for me as well. Thanks
Same issue still not resolved
Hi @Harish-Code-Goud, This issue is quite old, and more current information should be provided. Thanks.
hi @kevin-bates
when i tried to download ipynb file as pdf via latex in the jupyter , i got the message 500: internal server error repeatedly
please refer the below photo
I'm not seeing any issues with download as pdf via latex. Since this functionality leverages the nbconvert application, I suggest checking your version of nbconvert (I'm using 5.6.1), running with DEBUG mode enabled (e.g., jupyter notebook --debug ..., and capturing the output of the failed conversion from the notebook console.
Should you still have problems or are unable to determine what's going on, you may need to open an issue in the nbconvert repo. In doing a quick scan of existing nbconvert issues, this _might_ be related to: https://github.com/jupyter/nbconvert/issues/1099 since some of the more recent comments touch on an MiKTeX and Windows issue - so you might start there.
Most helpful comment
This works for me (for Debian/Ubuntu):
sudo apt-get install texlive-xetexhttps://nbconvert.readthedocs.io/en/latest/install.html#installing-tex