-
Notifications
You must be signed in to change notification settings - Fork 575
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
nbconvert fails to convert to pdf/latex #326
Comments
Do you have any config for nbconvert or the notebook? What exact command line are you using? Does nbconvert at the command line work with |
the command I run is --to pdf as I want a pdf but it fails on both (--to On 19/06/16 18:00, Thomas Kluyver wrote:
|
I mean, what is the full command line you entered, including the path to the notebook? Does the directory |
The command I run is jupyter nbconvert --to pdf On 19/06/16 18:22, Thomas Kluyver wrote:
|
Usually when you get a |
I appreciate that. Any suggestions on how to fix the problem? I've tried On 19/06/16 21:40, Thomas Kluyver wrote:
|
Maybe try to |
Thanks, that did the trick!!! Incidentally, why would the conversion On 20/06/16 09:13, Thomas Kluyver wrote:
|
Not really, it doesn't make a lot of sense to me. The only thing I can think of is that if you had deleted the working directory, leaving the terminal open, and recreated a directory with the same name, you might get some weird effects. But from the names of your directories, it seems unlikely that you did that. |
If you run off of the current master does this work? Also is it noteworthy that it couldn't find |
I have a similar problem, except that in my case --to latex works while --pdf does not. I do have pdflatex. Here's the code:
|
@yangnw If you specify an Do you have this problem if you directly pass in your file name rather than piping and using Edit: Also, when you include an error log, it would be helpful if you use code blocks:
and not simple inline code markup:
so that white space is not normalised to be spaces. |
The white space thing was a result of using single backticks in the markdown instead of triple backticks (for a code block). I've edited the comment and fixed it. |
Thanks for correcting the code block thing. As of last comment, running without xargs did not work either. But by then I had site packages installed globally and then I reinstalled the entire stack under virtualenv, and now the problem is solved. It may be that some random module related to io is referring to the wrong version of python, etc. I can't reproduce the problem already though. |
I am having this same problem. Calling Nbconvert generates PDF files in two stages -- first compiling to LaTeX and then calling I am not a really a Python programmer but this sounds like an easy fix. Any one else care to look at this? |
I've looked into this a bit more. As the error message indicates, when nbconvert tries to write the temporary file |
@mpacer Thanks for the hint about --output-dir In my case going from
to
solved the problem. |
I'm trying to save a notebook as pdf via latex and I'm failing to do so either via command line 'jupyter nbconvert --to pdf <notebook.ipynb>' or via the notebook's menu buttons. The error message tracebook is reported below but it complains that it can't create a .tex file
Traceback (most recent call last):
File "/home/bruno/anaconda3/bin/jupyter-nbconvert", line 6, in
main()
File "/home/bruno/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, *_kwargs)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 596, in launch_instance
app.start()
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 293, in start
self.convert_notebooks()
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 457, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 428, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/nbconvertapp.py", line 357, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/exporter.py", line 165, in from_filename
return self.from_file(f, resources=resources, *_kw)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/exporter.py", line 183, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/exporters/pdf.py", line 165, in from_notebook_node
tex_file = self.writer.write(latex, resources, notebook_name=notebook_name)
File "/home/bruno/anaconda3/lib/python3.5/site-packages/nbconvert/writers/files.py", line 127, in write
with io.open(dest, 'w', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'Documents/Analysis/notebook.tex'
I'm struggling to understand this as I've installed both latex and pandoc and that I'm able to save a latex file and then compiling into a pdf via pdflatex.
The text was updated successfully, but these errors were encountered: