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

Cannot interrupt kernel without killing it #115

Closed
jackkamm opened this issue Aug 26, 2017 · 2 comments · Fixed by #163
Closed

Cannot interrupt kernel without killing it #115

jackkamm opened this issue Aug 26, 2017 · 2 comments · Fixed by #163

Comments

@jackkamm
Copy link
Contributor

jackkamm commented Aug 26, 2017

Hi,

I find that ob-ipython-interrupt-kernel seems to kill instead of interrupting my kernel. After calling it, the ipython session becomes unresponsive, and the *ob-ipython-kernel-default* buffer prints

Process kernel-default finished

Using C-c C-c to interrupt also doesn't work, it neither interrupts nor kills, instead printing out the message, ERROR: Cannot interrupt kernels we didn't start.

A minimal example to reproduce this is

import time
for i in range(10): print(i); time.sleep(1)

Enter this within the *Python* buffer, then try to interrupt with either C-c C-c or ob-ipython-interrupt-kernel.

I am using Python 3.6, emacs 25.2.1, arch linux. I find the above to happen in both spacemacs and "emacs -Q".

Finally, I get some other error messages when starting up, that may or may not be related to this. I only see them in spacemacs (not emacs -Q). However I am posting them below in case they may shed some light on my configuration.

In buffer *ob-ipython-debug*

HTTP/1.1 500 Internal Server Error
Server: TornadoServer/4.5.1
Content-Type: text/html; charset=UTF-8
Date: Sat, 26 Aug 2017 15:56:20 GMT
Content-Length: 93

<html><title>500: Internal Server Error</title><body>500: Internal Server Error</body></html>

In buffer *ob-ipython-client-driver*

ERROR:tornado.application:Uncaught exception POST /execute/default (::1)
HTTPServerRequest(protocol='http', host='localhost:9988', method='POST', uri='/execute/default', version='HTTP/1.1', remote_ip='::1', headers={'Mime-Version': '1.0', 'Connection': 'keep-alive', 'Extension': 'Security/Digest Security/SSL', 'Host': 'localhost:9988', 'Accept-Encoding': 'gzip', 'Accept': '*/*', 'User-Agent': 'URL/Emacs', 'Content-Length': '433'})
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tornado/web.py", line 1467, in _stack_context_handle_exception
    raise_exc_info((type, value, traceback))
  File "<string>", line 4, in raise_exc_info
  File "/usr/lib/python3.6/site-packages/tornado/web.py", line 1669, in wrapper
    result = method(self, *args, **kwargs)
  File "/home/jack/.emacs.d/elpa/ob-ipython-20170628.1116/driver.py", line 99, in post
    c = get_client(name)
  File "/home/jack/.emacs.d/elpa/ob-ipython-20170628.1116/driver.py", line 72, in get_client
    clients[name] = create_client(name)
  File "/home/jack/.emacs.d/elpa/ob-ipython-20170628.1116/driver.py", line 60, in create_client
    cf = find_connection_file('emacs-' + name)
  File "/usr/lib/python3.6/site-packages/jupyter_client/connect.py", line 212, in find_connection_file
    raise IOError("Could not find %r in %r" % (filename, path))
OSError: Could not find 'emacs-default' in ['.', '/run/user/1000/jupyter']
ERROR:tornado.access:500 POST /execute/default (::1) 10.76ms
@gregsexton
Copy link
Owner

Thanks for raising. I've noticed this too. Will look to fix.

@dilzeem
Copy link

dilzeem commented Oct 3, 2017

Did you happen to find a resolve for this? I get a similar error.

The images that I create do not render inline but in a separate buffer. This buffer is read-only. It also creates a temporary file that disappears when I close the buffer.

I am using Spacemacs, with Emacs 25.3.2.

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

Successfully merging a pull request may close this issue.

3 participants