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

Unexpected behaviour of rendering multiple the same instances of ipywidgets.Output #13950

Closed
1 of 2 tasks
dsonyy opened this issue Jul 19, 2023 · 1 comment · Fixed by #14163
Closed
1 of 2 tasks

Unexpected behaviour of rendering multiple the same instances of ipywidgets.Output #13950

dsonyy opened this issue Jul 19, 2023 · 1 comment · Fixed by #14163
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug ipywidgets Rendering, loading, saving, anything to do with IPyWidgets

Comments

@dsonyy
Copy link

dsonyy commented Jul 19, 2023

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Vscode notebook has a problem with rendering correctly a cell with the following code:

import ipywidgets
from IPython.display import display

out = ipywidgets.Output()

with out:
    print("test")
    
display(out)
display(out)

Expected behaviour:
The same as in Jupyter Notebooks and Jupyter Lab. Cell should render the same instance of a widget two times:

test
test

Actual behaviour:
The widget is rendered only once:

test

If we add time.sleep between two display calls:

import ipywidgets
from IPython.display import display
import time

out = ipywidgets.Output()

with out:
    print("test")
    
display(out)
time.sleep(1)
display(out)

the behaviour is correct - two widgets are rendered which is worrying.

VS Code Version

1.80.1

Jupyter Extension Version

v2023.6.1101941928

Jupyter logs

No response

Coding Language and Runtime Version

Python 3.9.7

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@dsonyy dsonyy added the bug Issue identified by VS Code Team member as probable bug label Jul 19, 2023
@dsonyy dsonyy changed the title Unexpected behaviour of rendering multiple the same instances off ipywidgets.Output Unexpected behaviour of rendering multiple the same instances of ipywidgets.Output Jul 19, 2023
@DonJayamanne
Copy link
Contributor

Thanks for filing this issue, I can replicate this at my end.
Will look into this.

@DonJayamanne DonJayamanne added ipywidgets Rendering, loading, saving, anything to do with IPyWidgets jupyter-output labels Aug 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug ipywidgets Rendering, loading, saving, anything to do with IPyWidgets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants