9

I use ipywidgets to display asynchronous results from processes.

import ipywidgets as widgets

results = widgets.HTML()
display(results)

It works well, results appear correctly, but when the notebook is saved, the widgets are not there anymore. Is there a way to save them with the notebook?

jamborta
  • 5,130
  • 6
  • 35
  • 55

1 Answers1

2

There should be a menu entry in the "Widgets" menu to "Save notebook widget state". This is disabled by default to prevent widget state from bloating the notebook (widget state can often become quite large).

Vidar
  • 1,777
  • 1
  • 11
  • 15
  • For me (JupyterLab 1.2.6) this control is under the Settings menu, called "Save Widget State Automatically" – Leopd Jun 14 '20 at 15:27