Skip to content
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

How to save widget state after executing notebook #751

Closed
oscar6echo opened this issue Feb 5, 2018 · 15 comments
Closed

How to save widget state after executing notebook #751

oscar6echo opened this issue Feb 5, 2018 · 15 comments

Comments

@oscar6echo
Copy link
Contributor

I automate the execution and conversion to html of notebooks with this convenience package notebook-snapshot. In particular the execution script is there straight from the documentation.

My notebooks contain widgets. So I need to 'save widget state' after execution.
If I run a notebook manually, I would use click on 'Clear widget state' then 'Save widget state' to embed only the latest state in the notebook.

How to do that from nbconvert ?

@scottdraves
Copy link

We would like to develop a fix for this. Any special guidance from the maintainers?

@jasongrout
Copy link
Member

We would like to develop a fix for this. Any special guidance from the maintainers?

It looks like you are already working on it, from the referenced commits above. Thanks! How is it going? Any sticky points?

@scottdraves
Copy link

#779
there's a problem with python2.7 and unicode that we should have resolved tomorrow.
actually have several PRs that could use attention....

@mpacer
Copy link
Member

mpacer commented Mar 19, 2018

Could you list those PRs?

@scottdraves
Copy link

#778
#779
#780

lmitusinski pushed a commit to twosigma/nbconvert that referenced this issue Mar 22, 2018
lmitusinski pushed a commit to twosigma/nbconvert that referenced this issue Mar 22, 2018
ipywidgets min version changed to 7
@kennethjmyers
Copy link

Hey, what's the state of this? I'm very interested in this feature because I convert a lot of notebooks to html via cmd line and was hoping to include my widgets in those conversions and I think this is a feature I've been looking for.

@astrojuanlu
Copy link

I guess this is also related to the ongoing (usability) discussion on whether Jupyter should save the widget state by default (see this comment and the following ones).

maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Oct 16, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Oct 16, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Oct 16, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Oct 16, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Oct 16, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Nov 30, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Nov 30, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Nov 30, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Nov 30, 2018
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Nov 30, 2018
@astrojuanlu
Copy link

Latest PR addressing this issue: #900

maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Mar 22, 2019
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Mar 22, 2019
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Mar 22, 2019
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Mar 22, 2019
maartenbreddels pushed a commit to maartenbreddels/nbconvert that referenced this issue Mar 22, 2019
@akhmerov
Copy link
Member

akhmerov commented Aug 8, 2019

I believe this was closed in 5.5, see here.

@astrojuanlu
Copy link

Indeed, however with the new widgets functionality present in nbconvert 5.5, I am trying to convert a very simple notebook containing a slider to slides like this:

$ jupyter nbconvert --execute Untitled.ipynb --ExecutePreprocessor.store_widget_state=True --to slides

However, when I see them the widget is not shown. Perhaps I did not understand the feature?

@akhmerov
Copy link
Member

akhmerov commented Aug 8, 2019

This might be an unrelated issue, about embedding notebook javascript in the slides template; do you see the widgets if you convert to html?

@astrojuanlu
Copy link

Sorry, lazy comment - I will open a new issue with a notebook to reproduce and some screenshots.

@akhmerov
Copy link
Member

@maartenbreddels, should this issue be closed? (I believe you're one of the devs that are up to date on its status, my apologies if it isn't the case.)

@maartenbreddels
Copy link
Collaborator

Indeed, this can be closed.

@MSeal MSeal closed this as completed Aug 15, 2019
@astrojuanlu
Copy link

Regarding my last comment, this issue has already been reported at #1097.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants