-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving notebook omits widget buffers, even when "Save Widget State Automatically" is enabled. #16264
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Description
Saving notebook omits widget buffers, even when "Save Widget State Automatically" is enabled.
When saving a notebook with an embedded widget, if you want to share this notebook on a sharing site like notebooksharing.space, you want to fully embed the widget in the notebook. It's my understanding that "Save Widget State Automatically" intends to enable this use case.
The widget I develop, Lonboard, uses binary buffers to transfer data from Python to JS. When I save a notebook with a rendered widget, all widget state except the
buffers
is included in the saved JSON.This repo (https://github.com/kylebarron/jupyterlab-save-notebook-state-bug-example) includes a reproduction of this.
If you look at
example.json
(saved from JupyterLab), there are 3 widgets included in the notebook. The third widget (with"_layer_type": "scatterplot"
) should have abuffers
key but it's missing:In contrast, if we use nbconvert to run the notebook, we can see that the
buffers
key is included:Reproduce
This repo (https://github.com/kylebarron/jupyterlab-save-notebook-state-bug-example) has a pixi lockfile and notebook to reproduce.
pixi install
pixi run python -m ipykernel install --user --name "$(basename "$PWD")"
to initialize the python kernelpixi run jupyter lab
example.ipynb
Expected behavior
Expected the
buffers
key of the widget state to be saved.Context
Troubleshoot Output
Command Line Output
Browser Output
The text was updated successfully, but these errors were encountered: