Skip to content
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

Widget state not persisted after kernel restart #3758

Open
acbokade opened this issue Apr 13, 2023 · 2 comments
Open

Widget state not persisted after kernel restart #3758

acbokade opened this issue Apr 13, 2023 · 2 comments
Assignees
Labels
Custom Widget Issues related to using ipywidgets as a framework for custom widgets

Comments

@acbokade
Copy link

acbokade commented Apr 13, 2023

I have created a custom widget following this tutorial.
I am using ipywidgets == 8.0.6 and jupyterlab == 3.5.0.
By referring to this suggestion, I used the option ' Save Widget State Automatically'. But after the kernel restart, I am getting the 'Error displaying widget: model not found' error.
I am creating a different custom widget but for simplicity, I have used the tutorial example custom widget.
The use case I want to achieve is the same though; I want to persist the widget state in the Jupyter lab.
Is there anything I am missing?

@acbokade acbokade added the Custom Widget Issues related to using ipywidgets as a framework for custom widgets label Apr 13, 2023
@ibdafna ibdafna self-assigned this Apr 17, 2023
@gutow
Copy link

gutow commented Jul 19, 2023

I just noticed this behavior when testing my own widgets built using ipywidgets in the version 7 notebook with ipwidgets ~=8. Everything works, but the widget state is not saved. This definitely worked in the past.

@gutow
Copy link

gutow commented Jul 21, 2023

The widget state is still there and saved by JLab. Opening the notebook in NBClassic running against the Jupyter Server 2.7.0 shows the widget states and correctly indicates broken connections for widgets that talk to the kernel. Somehow JLab/Notebook 7 does not find the widget states in Notebooks even though it saves them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Custom Widget Issues related to using ipywidgets as a framework for custom widgets
Projects
None yet
Development

No branches or pull requests

3 participants