-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
emacs 30, macos, zmq error #542
Comments
It should be due to the the new commit of Emacs 30. Similar issue here: #540 |
Thank you! If I turn zmq off with (setq jupyter-use-zmq nil) then I get this (on macos, on linux it works fine): Launching notebook process on port 8888...done Any ideas? |
btw, emacs-mirror/emacs@f2bccae is probably not going away.. so emacs-zmq might need to be fixed to work with this change? |
It appears that emacs jupyter doesn't work with jupyter_server >= 2.x release.... |
I'm also getting "Error in ZMQ subprocess: wrong-type-argument" on linux (debian) GNU Emacs 30.0.50 Development version 57c0549 which pre-dates commit f2bccae by a couple months. This setup used to work fine, but after an update of several melpa/elpa packages now no longer works. Org 9.6.15, juypter-server 2.14.0, emacs-zmq 1.0.0. |
I believe I have found a fix for the @danielpopescu As for the REST API error, there may be more information in the notebook buffer. Could you list here the contents of the |
@danielpopescu I also had a 404 error once on a remote jupyter server I was using (that had password and token disabled). I don't remember the details but it was related to
|
This fixed the error. TY! |
Excellent. Looking forward to the fix! As far as 404 error, @gmoutso proposed fixed works in my case as well.... (using latest 3.12 python, emacs 30.0.60, and macos). |
Just updated to the latest emacs zmq... not sure if it was supposed to fix this issue, but now there is a new issue: " " ty |
Can you give a call to zmq-load to see if you can get it working. I think I know what the problem is, I'll take a look. Thanks. |
I did and actually build zmq from scratch, after which: Compilation finished Hope this helps... |
Looks like a typo, it's |
Go ahead and give it another try. I've added |
Thank you @nnicandro , I just updated and it works fine for me. |
Hello,
Just started getting this error (org version 9.7.5, latest of everything, macos, native compilation):
error in process filter: progn: Error in ZMQ subprocess: wrong-type-argument, (listp #[(ctx) ((setq load-path (cons "/.emacs.d/elpa/jupyter-20240420.1918/" load-path)) (require 'jupyter-ioloop) (setq jupyter-ioloop-poller (zmq-poller)) (setq jupyter-ioloop-stdin (let ((sock (zmq-socket ctx zmq-PAIR))) (prog1 sock (zmq-connect sock (format "tcp://127.0.0.1:%s" 51351))))) (zmq-poller-add jupyter-ioloop-poller jupyter-ioloop-stdin zmq-POLLIN) (let (events) (condition-case nil (progn (setq jupyter-channel-ioloop-session (let ((conn-info nil) (id "ee0db486-5825-441f-b599-a03b84903670") (key "69613b3a-165b-4715-9789-747ded51ac6b")) (progn (record 'jupyter-session conn-info id key)))) (require 'jupyter-channel-ioloop) (require 'jupyter-zmq-channel-ioloop) (setq jupyter-ioloop-post-hook (cons 'jupyter-zmq-channel-ioloop--recv-messages jupyter-ioloop-post-hook)) (let* ((--cl-var-- '(:shell :stdin :iopub :control)) (channel nil)) (while (consp --cl-var--) (setq channel (car --cl-var--)) (if (object-assoc channel :type jupyter-channel-ioloop-channels) (progn) (setq jupyter-channel-ioloop-channels (cons (jupyter-zmq-channel :session jupyter-channel-ioloop-session :type channel) jupyter-channel-ioloop-channels))) (setq --cl-var-- (cdr --cl-var--))) nil) (setq jupyter-ioloop-pre-hook (mapcar #'(lambda (f) (if (symbolp f) (progn (setq f (symbol-function f)))) (if (byte-code-function-p f) nil (byte-compile f))) (append jupyter-ioloop-pre-hook 'nil))) (zmq-prin1 '(start)) (let ((on-stdin (byte-compile #'(lambda nil (let* ((cmd (read (zmq-recv jupyter-ioloop-stdin))) (res (if (consp cmd) (let* ((x37 (car-safe cmd))) (cond ((eq x37 'send) (let* ((x38 (cdr-safe cmd))) (if (consp x38) (let* ((x39 (car-safe x38)) (x40 (funcall #'(lambda (x) (or (object-assoc x :type jupyter-channel-ioloop-channels) (error "Channel not alive (%s)" x))) x39)) (x41 (cdr-safe x38))) (if (consp x41) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (if (consp x43) (let* ((x44 (car-safe x43)) (x45 (cdr-safe x43))) (if (consp x45) (let* ((x46 (car-safe x45)) (x47 (cdr-safe x45))) (if (null x47) (let ((channel x40) (msg-type x42) (msg x44) (msg-id x46)) (list 'sent (eieio-oref channel 'type) (jupyter-send channel msg-type msg msg-id))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd))))) ((eq x37 'stop-channel) (let* ((x48 (cdr-safe cmd))) (if (consp x48) (let* ((x49 (car-safe x48)) (x50 (cdr-safe x48))) (if (null x50) (let ((type x49)) (let ((channel (object-assoc type :type jupyter-channel-ioloop-channels))) (if (and channel (jupyter-alive-p channel)) (progn (jupyter-stop channel))) (list 'stop-channel type))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd))))) ((eq x37 'start-channel) (let* ((x51 (cdr-safe cmd))) (if (consp x51) (let* ((x52 (car-safe x51)) (x53 (funcall #'(lambda (x) (or (object-assoc x :type jupyter-channel-ioloop-channels) (error "Channel not alive (%s)" x))) x52)) (x54 (cdr-safe x51))) (if (consp x54) (let* ((x55 (car-safe x54)) (x56 (cdr-safe x54))) (if (null x56) (let ((channel x53) (endpoint x55)) (if (jupyter-alive-p channel) (progn (jupyter-stop channel))) (eieio-oset channel 'endpoint endpoint) (let ((identity (let* ((cl-x jupyter-channel-ioloop-session)) (progn (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x) cl-struct-jupyter-session-tags) t))) (signal 'wrong-type-argument (list 'jupyter-session cl-x))) (aref cl-x 2))))) (jupyter-start channel :identity identity)) (list 'start-channel (eieio-oref channel 'type))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd))))) ((eq x37 'timer) (let* ((x57 (cdr-safe cmd))) (if (consp x57) (let* ((x58 (car-safe x57)) (x59 (cdr-safe x57))) (if (consp x59) (let* ((x60 (car-safe x59)) (x61 (cdr-safe x59))) (if (consp x61) (let* ((x62 (car-safe x61)) (x63 (cdr-safe x61))) (if (null x63) (let ((id x58) (period x60) (cb x62)) (prog1 nil (let ((timer (run-at-time 0.0 period (byte-compile cb)))) (puthash id timer jupyter-ioloop-timers)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd))))) ((eq x37 'callback) (let* ((x64 (cdr-safe cmd))) (if (consp x64) (let* ((x65 (car-safe x64)) (x66 (cdr-safe x64))) (if (null x66) (let ((cb x65)) (prog1 nil (setq jupyter-ioloop-timeout 0) (add-hook 'jupyter-ioloop-pre-hook (byte-compile cb) 'append))) (let nil (error "Unhandled command %s" cmd)))) (let nil (error "Unhandled command %s" cmd))))) ((eq x37 'quit) (let* ((x67 (cdr-safe cmd))) (if (null x67) (let nil (signal 'quit nil)) (let nil (error "Unhandled command %s" cmd))))) (t (let nil (error "Unhandled command %s" cmd))))) (let nil (error "Unhandled command %s" cmd))))) (if (and res (listp res)) (progn (zmq-prin1 res)))))))) (while t (run-hooks 'jupyter-ioloop-pre-hook) (setq events (condition-case nil (zmq-poller-wait-all jupyter-ioloop-poller jupyter-ioloop-nsockets jupyter-ioloop-timeout) ((zmq-EAGAIN zmq-EINTR zmq-ETIMEDOUT) nil))) (let ((stdin-event (zmq-assoc jupyter-ioloop-stdin events))) (if stdin-event (progn (setq events (delq stdin-event events)) (funcall on-stdin)))) (run-hook-with-args 'jupyter-ioloop-post-hook events)))) (quit (mapc #'jupyter-stop jupyter-channel-ioloop-channels) (zmq-prin1 '(quit)))))) nil])
Any ideas?
The text was updated successfully, but these errors were encountered: