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

jupyter2: pdf printing broken for certain paths #1923

Closed
haraldschilly opened this issue May 6, 2017 · 2 comments
Closed

jupyter2: pdf printing broken for certain paths #1923

haraldschilly opened this issue May 6, 2017 · 2 comments
Assignees
Labels
A-jupyter E-unclear P-blocker Critical -- Stop most things to fix upstream

Comments

@haraldschilly
Copy link
Contributor

haraldschilly commented May 6, 2017

steps to reproduce:

  1. open terminal in $HOME
mkdir subdir
open subdir/sub-dir.ipynb
# do 1+1 and save the file
jupyter nbconvert --to pdf subdir/sub-dir.ipynb

gives

[NbConvertApp] Writing 15556 bytes to subdir/notebook.tex
Traceback (most recent call last):
  File "/usr/local/bin/jupyter-nbconvert", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.4/dist-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/nbconvertapp.py", line 305, in start
    self.convert_notebooks()
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/nbconvertapp.py", line 473, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/nbconvertapp.py", line 444, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/nbconvertapp.py", line 373, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/exporters/exporter.py", line 171, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/exporters/exporter.py", line 189, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/exporters/pdf.py", line 173, in from_notebook_node
    tex_file = self.writer.write(latex, resources, notebook_name=notebook_name)
  File "/usr/local/lib/python3.4/dist-packages/nbconvert/writers/files.py", line 126, in write
    with io.open(dest, 'w', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'subdir/notebook.tex'
@haraldschilly
Copy link
Contributor Author

best upstream issue I found is: jupyter/nbconvert#326 (comment)

hence we should try to add --output-dir <output_dir>

@williamstein
Copy link
Contributor

time: 35 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-jupyter E-unclear P-blocker Critical -- Stop most things to fix upstream
Projects
None yet
Development

No branches or pull requests

2 participants