tkf / emacs-ipython-notebook

IPython notebook client in Emacs
tkf.github.com/emacs-ipython-notebook/
GNU General Public License v3.0
548 stars 51 forks source link

Can't reliably restart kernel #114

Closed twiecki closed 11 years ago

twiecki commented 11 years ago

When restarting a NB kernel using C-c C-r I often get:

ein: [info] Restarting kernel
gv-get: (ein:$websocket-onclose (ein:$kernel-shell-channel kernel)) is not a valid place expression
Error running timer: (invalid-slot-name "#<ein:notification-status KernelStatus>" :buffer)

Sometimes it does work, but not reliably. Any idea?

tkf commented 11 years ago

There seems to be two problems. There is query-timeout option to workaround some issue in url.el. It is not required if you have curl command line program. If you have curl, then the latest commit should fix one of the issues.

The other issue I see in your error message is that one from gv-get. It seems there is a compilation issue. I know it occurs when you upgrade Emacs 23.x to 24.x. Remove PATH/TO/EIN/lisp/*.elc and then restart Emacs. This may fix your problem.

twiecki commented 11 years ago

OK. I upgraded and have curl installed. I also removed the elc files. I now get during restart: Error running timer: (invalid-slot-name "#<ein:notification-status KernelStatus>" :buffer)

Perhaps unrelated (but maybe not) during upgrade I got: Eager macro-expansion failure: (error "(websocket-client-data ws) is not a valid place expression")

tkf commented 11 years ago

(websocket-client-data ws) is not a valid place expression

means you also need to remove websocket.elc. Probably you need to remove all manually installed elc files (and then recompile them, if you want).

invalid-slot-name "#<ein:notification-status KernelStatus>" :buffer

This is bit strange. What Emacs version are you using?

twiecki commented 11 years ago

I was running the trunk as I was testing out the fix for the scrolling images.

I tested it again with emac24 that comes with ubuntu and it works fine again. It seems that there should be a "recompile every .el file" in emacs.

tkf commented 11 years ago

Yea, it would be much better if Emacs recompiles elc just like Python does with pyc...

twiecki commented 11 years ago

Thanks for the quick fix!

markusbaden commented 11 years ago

Just in case other people run into the same problem. I had a similar error message when recently updating ein via el-get, in particular I got

(ein:$node-data node) is not a valid place expression

Removing all .elc files in the ein/lisp and websocket directory fixed the problem.