Skip to content

Save widgets state

Osvaldo A Martin edited this page Oct 25, 2023 · 2 revisions

This seems to have been solved in Jupyter 7.0.6 (or maybe even 7.x) and the steps described below are no longer necessary as widgets states are saved automatically (there is an option under Settings --> Save Widget State Automatically)

Every time we change a notebook example that uses widgets. We need to perform the following steps to save the widget state.

  1. Clear cell output
  2. Clear widget state (there is a "Clear Notebook Widget State" option under the Widgets menu)
  3. Refresh page (yep, this is important!)
  4. Execute cells
  5. Save widget state (there is a "Save Notebook Widget State" option under the Widgets menu)

If these steps are not done in this order, widgets will not render in the docs. Additionally, the size of the notebook will increase as we will save new states without actually removing the previous one.

Clone this wiki locally