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

Error executing Jupyter command #162

Open
spegoraro opened this issue Feb 22, 2018 · 2 comments
Open

Error executing Jupyter command #162

spegoraro opened this issue Feb 22, 2018 · 2 comments

Comments

@spegoraro
Copy link

spegoraro commented Feb 22, 2018

Thanks for the excellent package!

When attempting to execute an org source block the minibuffer shows the following:
There was a fatal error trying to process the request. See *ob-ipython-debug*

The debug output contains:
Error executing Jupyter command '/home/[user]/.emacs.d/packages/ob-ipython/client.py': [Errno 2] No such file or directory

I ran it with EDebug to get the command line passed to jupyter and tried calling it directly from the command line with the following:
/usr/bin/jupyter -- ~/.emacs.d/packages/ob-ipython/client.py --conn-file default --execute <<< "import numpy as np"

But get the exact same error message.

If I incrementally run client.py in a jupyter console (excluding the argparse stuff) it all works as expected so I'm unable to work out where it's going wrong.

I have also tried with jupyter, notebook, core, client and console all at version 5.0.0 in a virtualenv with the same result.

Edit:
Executing the org source block correctly starts the kernel and places the config at /run/user/1000/jupyter/emacs-default.json
If I call the same command as above and provide the absolute path to the config file it still gives the same error.

Edit 2:
It seems that jupyter itself can't run the file which I guess is an oversight by me. If I change python-shell-interpreter to python it works fine however this breaks functionality with other packages like elpy. For now I can just set it buffer-local but it would be good for ob-ipython--get-python to handle this automatically.

Any ideas?

@yitang
Copy link

yitang commented Jul 8, 2018

same problem for me.

dangirsh pushed a commit to dangirsh/ob-ipython that referenced this issue Jul 22, 2018
output (e.g. warnings) from getting mixed with the client output, and then
breaking the json parser.

Aims to fix issue gregsexton#162
dangirsh pushed a commit to dangirsh/ob-ipython that referenced this issue Jul 22, 2018
output (e.g. warnings) from getting mixed with the client output, and then
breaking the json parser.

Aims to fix issue gregsexton#162
@alf-mindshift
Copy link

The problem seems to be that ob-ipython doesn't honour python-shell-interpreter-args, thus you can't use jupyter as the python-shell-interpreter together with ob-ipython.

Try using ipython instead.

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