-
Notifications
You must be signed in to change notification settings - Fork 293
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
ipywidgets not working after changing kernel #8085
Comments
@sdissegna-maystreet Thanks for the repro on this. I repro the same thing on current bits. When I change the kernel th first time that I change the kernel the cell with the widget can run, but no widget appears. If I try to run the cell a second time the cell runs forever without finishing: |
This is also even more of an issue when using a remote jupyter server: I haven't been able to figure out how to get ipywidgets working ever again in a notebook, while that notebook is associated with a particular kernel running on the remote jupyter server. That is, once you choose a specific running kernel from the kernel chooser, closing and reopening the notebook file, or reloading the UI or closing and reopening the workspace, or even quitting and restarting vscode will not restore ipywidgets. The only way to get the widgets to work again for that notebook file is to choose the entry in the kernel picker that creates a new kernel (rather than reconnecting to an existing kernel), then close and reopen the file (or reload the UI), then re-attempt. I presume/hope #8096 will also fix this case too, but it would certainly be good to check. |
Unfortunately, even with the new changes in Jupyter extension version 2021.10.100, this bug in fact does still affect reconnecting to existing sessions on a remote server. That is, connecting to a new kernel (and creating a session on the remote server) now no longer breaks ipywidgets, but when re-connecting to an existing session, widgets are still broken. The easiest steps to reproduce this are:
If you then go to the kernel picker and create a kernel session, you can run both cells and the slider reappears. But again connecting back to the existing session, the slider will not appear and ipywidgets remains broken. @IanMatthewHuff would you prefer I create a new issue for this part of the bug, or just keep it all in this issue? |
Sorry for not noting this above, but I can confirm that on v2021.10.1001414422 of the Jupyter extension, not only does |
Thanks for your feedback. |
Environment data
Expected behaviour
After changing kernel, cells with ipywidgets can be re-run to show the widgets.
Actual behaviour
After changing the kernel, ipywidgets stops working.
Steps to reproduce:
Given a notebook containing a single cell with this code:
If you run it, it will show a widget. If you now change kernel, then change back to the original kernel, and then run it again it will no longer show a widget. If you close the notebook and re-open it, it will work.
The text was updated successfully, but these errors were encountered: