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

ipywidgets not renderering without a kernel #3773

Open
jgunstone opened this issue May 16, 2023 · 1 comment
Open

ipywidgets not renderering without a kernel #3773

jgunstone opened this issue May 16, 2023 · 1 comment

Comments

@jgunstone
Copy link

Description

image

Reproduce

import ipywidgets as w

w.VBox([
    w.Text(), 
    w.Textarea(), 
    w.IntText(), 
    w.IntSlider(), 
    w.IntRangeSlider()
])

then shutdown the kernel and reopen the notebook. you will see the image above

Expected behavior

expect to see the HTML widgets as preview (though I understand there is no control other jslink without the kernel)

image

Context

wsl - ubuntu2004
chrome

tried in both the envs listed below:

env1

ipywidgets 8.0.4 pyhd8ed1ab_0 conda-forge
JupyterLab v3.4.4
/home/jovyan/mambaforge/envs/ipyautoui-dev/share/jupyter/labextensions
bqplot v0.5.37 enabled OK (python, bqplot)
jupyter-vuetify v1.8.4 enabled OK
ipydatagrid v1.1.14 enabled OK
jupyterlab-plotly v5.9.0 enabled OK
jupyter-vue v1.8.0 enabled OK
jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
@jupyter-widgets/jupyterlab-manager v5.0.5 enabled OK (python, jupyterlab_widgets)
@voila-dashboards/jupyterlab-preview v2.2.0 enabled OK (python, voila)
@telamonian/theme-darcula v4.0.0 enabled OK (python, theme-darcula)
@krassowski/jupyterlab-lsp v3.10.2 enabled OK (python, jupyterlab-lsp)

env2

ipywidgets 8.0.6 pypi_0 pypi
JupyterLab v4.0.0
/home/jovyan/mambaforge/envs/document-issue-dev/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled X (python, jupyterlab_pygments)
bqplot v0.5.40 enabled X (python, bqplot)
jupyter-vuetify v1.8.10 enabled X
ipydatagrid v1.1.15 enabled X
jupyter-vue v1.9.0 enabled OK
jupyterlab-jupytext v1.3.8+dev enabled X (python, jupytext)
@jupyter-widgets/jupyterlab-manager v5.0.7 enabled X (python, jupyterlab_widgets)

@paddymul
Copy link
Contributor

paddymul commented Jun 6, 2023

From the call I understand that there was a change in behavior for this saving widget state between Jupyterlab and Jupyter notebook. Where was that change documented, and the reasoning behind it (I would imagine in a Jupyterlab changelog).

Now imagine the experience from a user of Jupyter. The core widgets team understands why this might have stopped working, but that user won't. The current message is unhelpful, "Error displaying widget: model not found".

As a developer I would want a message listing the model name being searched for, and the models that are available to be loaded.

As a user, the context of why the model can't be found should be shown. If this is the desired behavior of JupyterLab, this isn't an error... but a message along the lines of "JupyterLab doesn't persist model state between saves because ???, to see this widget output re-execute the above cell".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants