-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Jupyter Notebook: "Interrupt kernel" restarts kernel, all variables lost #478
Comments
Hey @Ramkumar-R, thanks for reporting. I have a couple of questions for you, according to what you said:
Did you open a notebook in JupyterLab and then connect to its kernel from Spyder? Or are you using Spyder-notebook to work with notebooks?
Could you post a screenshot or a small video showing that? It'd help us a lot to better understand your problem. |
@ccordoba12 Thank you so much for looking at this! Here are some screenshots. |
Yes, this is much clearer now, thanks!
Thanks for your kind words! And I totally understand this a serious bug that prevents to use our notebook plugin. Since this is directly related to that plugin, I'm going to move this issue to its corresponding repository. |
@jitseniesen, are you able to reproduce this problem? |
@Ramkumar-R Thank you for the report. I have reproduced the issue, but I need to look further into it to see what is going wrong. |
Sorry for the delayed ack. Greatly appreciate your effort and time! Looking forward to the fix when it happens! |
It took me a while because I was looking in the wrong place, but I think I have now figured out what is going on. When you open a notebook inside Spyder, the notebook server uses The issue does not appear with Jupyter kernels inside a notebook, because Jupyter kernels are not started with So, how to fix this? Here are some ideas:
@mrclary You authored the aforementioned commit, what do you think? |
However, given the issue with the notebook plugin, we should definitely investigate. I prefer your first two suggestions over reverting to activation scripts, but these are contingent on being whether they are possible to do. Does this issue manifest for pip environments? |
@jitseniesen, I can't even get the notebook plugin to work at all. Tried with Spyder 6.0.1 and Spyder 6.0.3.
I see the following:
and no kernel associated with the notebook, nor can I select a kernel. For Spyder, the Python interpreter is set to Internal. |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
With Jupyter notebooks, "Interrupt Kernel" does just that - stops the kernel and all variables are preserved. "Restart kernel" is a separate option. However upon using a fresh installation of Spyder with the Notebook plugin, clicking "Interrupt kernel" or the square box icon restarts the kernel and all variables are lost.
What steps reproduce the problem?
What is the expected output? What do you see instead?
"The kernel appears to have died..."
and
Traceback... Name 'j' is not defined.
Neither of the above should not happen.
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
The text was updated successfully, but these errors were encountered: