Differing behaviors between classic Jupyter Notebook and JupyterLab & VS Code for ipywidgets #6729
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
ipywidgets
Rendering, loading, saving, anything to do with IPyWidgets
Milestone
Environment data
Expected behaviour
Updating or interacting with widgets triggers handlers which sends output to cell
Actual behaviour
Included in summary
Steps to reproduce:
Logs
Included in summary
Summary
I recently inherited some code from someone and in the process of trying to run it in a classic Jupyter Notebook and in JupyterLab & VS Code, I noticed it behaves slightly different in each. Below is stripped down minimal code to reproduce the behavior I'm seeing, and I've preserved the structure of the code (my disclaimer that it’s a bit odd and not optimal) in case that comes into play.
In a classic Jupyter Notebook, when either the button is clicked or the dropdown changes new output is produced and sent to the output of the cell. But in JupyterLab the output is sent to the Log and the output in the cell stays the same. This also happens when I use the same notbook server for the classic notebook that I'm using for JupyterLab. Interestingly VS Code has similar behavior as JupyterLab in that the output in the cell stays the same and warnings/info messages are thrown. Also if it helps, in VS Code, in the Output - Jupyter section it gives the following warnings/info messages when the dropdown widget is changed:
and the following when the button is clicked:
My hunch is that this isn't a bug per-se but that, but rather that the code improperly relies on behavior that differs between a classic Jupyter Notebook and JupyterLab & VS Code. Any ideas as to what the issue may be or what the differing behaviors are and why it works in a classic Jupyter Notebook but not JupyterLab / VS Code?
Thanks
Setup versioning:
Python 3.6.12 |Anaconda, Inc.| (default, Sep 8 2020, 17:50:39)
notebook 6.4.0
jupyterlab 3.0.16
ipywidgets 7.6.3
IPython 7.16.1
matplotlib 3.3.4
seaborn 0.11.1
Firefox 90.0.1
macOS Big Sur (11.4)
I'm also posting this on the VS Code - Jupyter Extension and JupyterLab forums/github.
The text was updated successfully, but these errors were encountered: