-
-
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
help debugging why emacs-jupyter has stopped working #559
Comments
You can launch a kernel and, even if you get the "assertion failed", you should still be able to access the kernel process' stdout to see if there are any errors that happened to popup before it was killed. That assertion is essentially To just launch a kernel (without sending any messages to it): (setq kernel (jupyter-kernel
:spec (jupyter-guess-kernelspec "python")))
(jupyter-launch kernel) ; Don't worry about the `jupyter-alive-p` assertion if it happens and then to get to the process buffer: (pop-to-buffer (process-buffer (jupyter-process kernel))) To delete the kernel process (jupyter-shutdown kernel) Not sure how the Since you are building the zmq library manually, could you go into it's folder and run the tests with |
well good news, the zmq tests pass (They are not included in the elpa package I guess, I had to get them from the repo). I am not sure how I saw the EINTR message, I haven't been seeing it in these tests. Maybe it isn't relevant. I have been able to run some of the codes you suggested. This worked I think:
without error once, but continuing to try to figure out what is happening I am getting errors like this
I can see there are some python processes running, and killing them doesn't seem to help or release the port, there is just a new port already in use. I guess this is an error on the Python side. Here is the full traceback.
I am not sure what I could have done to cause this. |
It could be because, in order to get a set of open ports on a system, I essentially shell out to the I'm not sure if killing the
I did find a bug that (2) wasn't actually waiting until the connection file was deleted before going to (3) so there is a chance that the process could not have terminated gracefully, I think. But I don't know if that means the ports would still be considered in use even if the process that opened them has been terminated. Not sure why the Just for testing purposes, could you fiddle with how long to wait between a call to (cl-defmethod jupyter-launch :before ((kernel jupyter-kernel-process))
(pcase-let (((cl-struct jupyter-kernel-process session) kernel))
(unless session
(setf (jupyter-kernel-session kernel) (jupyter-session-with-random-ports))
(sleep-for 1.0)))) |
This didn't seem to change anything, at least up to 5 seconds. It seems to hang on |
I finally saw EINTR again. This happened from just typing C-c C-c to start an org-block. This is all that was in the messages.
I tried running
but didn't see anything out of the ordinary:
now it gets a little weirder. I tried running the src block, and it worked, and for a reason that is unknown to me, it seems to be working again. so weird. it seems to have survived restarting emacs. I do not know what I did to fix it. It could be some updated packages in emacs, or in brew. I may never know. Thanks for the tips on getting in to the internals though! I will leave this open for a bit in case something comes back, but if I don't add to it in a few days or you want to close it, go ahead. |
I have been using emacs-jupyter in org-mode for a long time, but sometime in the last week it stopped working, I suspect after updating MacOS to Sequoia, although it works fine on another Mac where I did that.
It seems to just time out while requesting kernel info. I can see a python process running in the Activity Monitor. eventually though it either hangs, or dies with a message like "EINTR:", or
cl--assertion-failed: Assertion failed: (jupyter-alive-p kernel)
. I tried rebuilding the zmq library, and updating jupyter, and emacs, but it has not helped.The problem seems to be in
jupyter--start-kernel-process
, but I am not sure how to proceed with fixing it.I am running GNU Emacs 30.0.91 (build 1, x86_64-apple-darwin24.0.0, NS appkit-2566.00 Version 15.0 (Build 24A335)) of 2024-10-01.
Jupyter works fine to launch jupyter lab.
Any ideas?
The text was updated successfully, but these errors were encountered: