Skip to content

IPyWidgets support #38

Description

@eleonorecharles

Description

When using IPyWidgets (specifically tqdm.notebook) in a Jupyter notebook, refreshing the browser page while a progress bar is running causes the widget to display only "Loading widget..." instead of the proper progress bar. The widget only renders correctly after the operation completes.

Image

Reproduce

  1. Install the required packages:
pip install jupyter_server_nbmodel[lab] tqdm ipywidgets
  1. Start JupyterLab and create a new notebook
  2. Execute the following code in a cell:
from tqdm.notebook import tqdm
import time

for i in tqdm(range(100)):
    time.sleep(0.5)  # Simulate long-running process
  1. While the progress bar is still running, reload the browser page
  2. Observe that the progress widget shows "Loading widget..." text instead of the actual progress bar

Expected behavior

After reloading the page, the IPyWidget should maintain its state and continue displaying the proper progress bar without showing "Loading widget..." text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions