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

Default ipywidgets don't show up in notebooks #3020

Closed
kharvd opened this issue Aug 19, 2022 · 5 comments
Closed

Default ipywidgets don't show up in notebooks #3020

kharvd opened this issue Aug 19, 2022 · 5 comments
Labels

Comments

@kharvd
Copy link

kharvd commented Aug 19, 2022

Describe the current behavior
Default ipywidgets like checkboxes stopped working, for example in this notebook https://colab.research.google.com/github/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Using%20Interact.ipynb

Line interact(f, x=10); works as expected (shows a slider), but running interact(f, x=True); results in a sidebar popup "Support for third party widgets (widgets outside of the ipywidgets package) needs to be enabled separately. Support for these widgets will be loaded from a CDN external from Colab." and no checkbox is displayed.

Running the suggested snippet doesn't seem to help.

from google.colab import output
output.enable_custom_widget_manager()

Adding !pip install "ipywidgets>=7,<8" before the ipywidgets import fixes the issue.

Describe the expected behavior
Checkboxes and other interactive widgets from ipywidgets work with the latest version of ipywidgets.

What web browser you are using
Chrome

Additional context
https://colab.research.google.com/github/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Using%20Interact.ipynb

@kharvd kharvd added the bug label Aug 19, 2022
@colaboratory-team
Copy link
Contributor

colaboratory-team commented Aug 19, 2022

Thanks for the report, we are aware of the issue and are going to roll out a fix. Downgrading ipywidgets to 7.7.1, as you noted, is the easiest fix in the meantine

@nneibaue
Copy link

+1 to this issue. @kharvd your fix !pip install "ipywidgets>=7,<8" is also working for me.. great find!

@simoncos
Copy link

simoncos commented Aug 22, 2022

Same issue here for HTML and Label:

import ipywidgets as widgets
widgets.HTML('TEST') # or widgets.Label('TEST')

And ipywidgets downgrading works.

@colaboratory-team
Copy link
Contributor

The fix for this should now be rolled out. If you are still seeing the issue, try deleting your runtime and connecting to a new one

@blois
Copy link
Contributor

blois commented Aug 22, 2022

  • The issue originated from a container upgrade which picked up the 8.0.0 release of ipywidgets. Our testing covered basic interactions with a subset of the widgets, but did not validate the functionality of all core widgets.
  • Colab's support of widgets is designed specifically to allow hosting multiple version of widgets in parallel, but support for the 8.0.0 changes was not enabled when the ipywidgets==8.0.0 upgrade went out.
  • As a result of this we've added more comprehensive test coverage of the core widgets in Colab to try to catch these compatibility issues earlier.
  • Shortly we'll roll out proper support for ipywidgets==8.0.0 so they will work for users who do install the newer package.
  • At some point in the future we will want to upgrade the default ipywidgets version to stay up to date. This should not prevent users from manually downgrading to ipywidgets==7.7.1.

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

No branches or pull requests

5 participants