You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from IPython.display import display
button = widgets.Button(description="Click Me!")
output = widgets.Output()
display(button, output)
def on_button_clicked(b):
with output:
print("Button clicked.")
button.on_click(on_button_clicked)
I was recently caught out by this same issue. In v6 of Notebook this output would be shown but not in v7 which is based on JupyterLab. JupyterLab sends output generated by events that are out of the normal processing flow to the log it would appear. A real pain and significant breaking change for sure. I was also caught out by the fact that VS Code behaves like Notebooks v6 and that si what I used to develop my Notebook, see here: microsoft/vscode-jupyter#15996
Description
ipywidgets works well in Jupyter Notebook 6.X but does not work in the latest Jupyter Notebook / JupyterLab 7.X.
Reproduce
The above code works as expected on running it in Jupyter Notebook 6.X
Expected behavior
Click on button should display output but nothing appears.
Context
The text was updated successfully, but these errors were encountered: