Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server error when downloading PDF via LaTeX #2974

Closed
lumberbot-app bot opened this issue Oct 24, 2017 · 12 comments · Fixed by #2981
Closed

server error when downloading PDF via LaTeX #2974

lumberbot-app bot opened this issue Oct 24, 2017 · 12 comments · Fixed by #2981

Comments

@lumberbot-app
Copy link

lumberbot-app bot commented Oct 24, 2017

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:

errorjupyter

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

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Oct 24, 2017

@mpacer commented: Does the Mac have the same error?

what version of notebook and nbconvert do you have?

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Oct 24, 2017

@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.

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Oct 24, 2017

@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?

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Oct 24, 2017

@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.

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Oct 24, 2017

@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?

@mpacer
Copy link
Member

mpacer commented Oct 25, 2017

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

f5e9e2e
2056b1b

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.

@raghav18gupta
Copy link

This works for me (for Debian/Ubuntu):
sudo apt-get install texlive-xetex

https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex

@minrk minrk added this to the Reference milestone Sep 13, 2018
@mirjunaid26
Copy link

This works for me (for Debian/Ubuntu):
sudo apt-get install texlive-xetex

https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex

Worked for me as well. Thanks

@Harish-Code-Goud
Copy link

Same issue still not resolved

@kevin-bates
Copy link
Member

Hi @Harish-Code-Goud, This issue is quite old, and more current information should be provided. Thanks.

@Harish-Code-Goud
Copy link

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
Capture

@kevin-bates
Copy link
Member

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: jupyter/nbconvert#1099 since some of the more recent comments touch on an MiKTeX and Windows issue - so you might start there.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants