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

printview assumes the notebook is in the current working directory #1085

Open
achampion opened this issue Sep 11, 2017 · 3 comments
Open

printview assumes the notebook is in the current working directory #1085

achampion opened this issue Sep 11, 2017 · 3 comments

Comments

@achampion
Copy link

achampion commented Sep 11, 2017

Printview fails if you have changed the working directory of your notebook, e.g.

%cd subdirectory

Now printview fails with:

[NbConvertApp] WARNING | pattern 'notebook.ipynb' matched no files

And just prints out the help message to nbconvert in the log.

@achampion achampion changed the title printpreview assumes the notebook is in the current working directory printview assumes the notebook is in the current working directory Sep 11, 2017
@juhasch
Copy link
Member

juhasch commented Sep 15, 2017

It is not so easy to get the path right, because the current implementation of printview starts an jupyter nbconvert command in the current kernel, and possibly (as you noticed in) the wrong directory. Fixing would be possible with some effort. I think the better solution is to wait for jupyter/notebook#2413.

@achampion
Copy link
Author

Agree, it would be better to have jupyter do the conversion vs the python kernel doing it. As you mentioned while it is easy to get the path of the notebook relative to the jupyter root, getting that jupyter root in the python kernel not so easy.

@michalkahle
Copy link

Printview also doesn't work with R kernel (or any other than Python kernel) for the reason mentioned above (tries to execute Python code in current kernel to convert the notebook).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants