Skip to content

In JupyterLab 4.02, ipywidgets throws error in console on saving widget state. #3790

Closed
@kolibril13

Description

@kolibril13

In JupyterLab 4.02 with the setting "save widget state automatically" enabled, I get the following message in the console when saving the notebook (even if there's no widget present in the notebook):

TypeError: this._context.model.metadata.set is not a function at f._saveState

The error does not come when the "save widget state automatically" setting is not activated.

here is the environment that I've used:

python3.11 -m venv .venv
source .venv/bin/activate   
pip install jupyterlab   
pip install ipywidgets 
python -m jupyterlab
image

I've also tested this in an older version (pip install jupyterlab==3.6), and there it worked fine without the error.

Context: I've observed this error while working on this issue widgetti/ipyreact#40

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions