nnicandro / emacs-zmq

Emacs bindings to ØMQ
GNU General Public License v2.0
49 stars 18 forks source link

Error with native-comp: Error in ZMQ subprocess: invalid-function, (" Error: Wrong type argument: listp, #<subr jupyter-server-ioloop--recv-messages>") #32

Closed veprbl closed 5 months ago

veprbl commented 3 years ago

When trying to evaluate a code block, emacs-jupyter fails with:

error in process filter: zmq--subprocess-filter: Error in ZMQ subprocess: invalid-function, (" Error: Wrong type argument: listp, #<subr jupyter-server-ioloop--recv-messages>")
error in process filter: Error in ZMQ subprocess: invalid-function, (" Error: Wrong type argument: listp, #<subr jupyter-server-ioloop--recv-messages>")
error in process filter: zmq--subprocess-filter: Error in ZMQ subprocess: invalid-function, (" Error: Wrong type argument: listp, #<subr jupyter-server-ioloop--recv-messages>")
error in process filter: Error in ZMQ subprocess: invalid-function, (" Error: Wrong type argument: listp, #<subr jupyter-server-ioloop--recv-messages>")
Assertion failed: (process-live-p process)

This error is not seen on emacs 27 and emacs 28 without the native-comp.

Emacs 28 is built from 6ca6c71cd0bf8fc970d9b1477ea61a670469f672

Applying the #22 doesn't seem to affect this issue.

gmoutso commented 2 years ago

I have the same error. Have you found a solution?

If I (setq zmq--subprocess-debug t) and after jupyter-server-kernel-list-launch-kernel I have a kernel in the serve list of kernels. Pressing enter on the kernel I get the error

Debugger entered--Lisp error: (error "Timeout when connecting websocket to kernel id 62c...")
  error("Timeout when connecting websocket to kernel id %s" "62cc8cb2-ebf0-4e0d-82ca-c444d46c1cb8")
  jupyter-server--connect-channels(#<jupyter-server jupyter-server-15732ecded76> "62cc8cb2-ebf0-4e0d-82ca-c444d46c1cb8")
  #f(compiled-function (cl--cnm comm kcomm) #<bytecode -0x1a0f3b655d84e5>)(#f(compiled-function (&rest cnm-args) #<bytecode 0x7c1de661205bab8>) #<jupyter-server jupyter-server-15732ecded76> #<jupyter-server-kernel-comm jupyter-server-kernel-comm-15732fe855e6>)
...
gmoutso commented 2 years ago

I got it working. I removed eln files

rm /home/moutsopoulosg/.emacs.d/eln-cache/28.1-6071d483/zmq*
rm /home/moutsopoulosg/.emacs.d/eln-cache/28.1-6071d483/jupyter*

and added jupyter and zmq to comp-deferred-compilation-deny-list

(setq native-comp-deferred-compilation t
            native-comp-deferred-compilation-deny-list '("jupyter" "zmq"))
jtlaune commented 2 years ago

@gmoutso 's solution worked for me as well. The ZMQ error showed up after I updated my emacs packages.

nnicandro commented 1 year ago

I think I fixed the issue in emacs-jupyter. Maybe update to the latest version and test with native compile enabled. Note, this issue shouldn't come up once I merge the next branch of emacs-jupyter since using the jupyter-server fucntionality no longer relies on ZMQ in that branch.