ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Output widget deletes all output if display takes longish

Open soerenwolfers opened this issue 6 months ago • 0 comments
trafficstars

If I display an ipywidget Output widget as follows:

import plotly.express as px
from ipywidgets import Output
widget = Output()
widget

and then try to fill it with content as follows:

a = list(range(50_000))
with widget:
    display(px.line(a, a))

the contents disappear after a short time. After running the second cell for a second time, the output persists as expected.

This issue disappears if the display call is fast enough; for example, when I reduce the number of points from 50_000 to 5.

The issue happens in both regular JupyterLab and the JupyterLab Notebook interface. It happens in both Chrome and Firefox.

Versions: ipywidgets==8.1.6 IPython=9.1.0 plotly==6.0.1 jupyterlab==4.4.1 jupyterlab-widgets==3.0.14

https://github.com/user-attachments/assets/4a9def8f-1e6a-4473-a07e-3fec67879a3f

soerenwolfers avatar Apr 24 '25 23:04 soerenwolfers