first-order-model icon indicating copy to clipboard operation
first-order-model copied to clipboard

Colab demo: widgets no longer displaying

Open NeilFranks opened this issue 2 years ago • 12 comments

Not sure if there was a recent update to colab, but now when i run the notebook, the cells all run successfully but no UI appears. Instead, I get a message from Colab saying:

Third-party Jupyter widgets
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.

along with a block of code to run which supposedly enables 3rd party widgets:

from google.colab import output
output.enable_custom_widget_manager()

I can add and run that block but get the same problem, no UI. Is there a known workaround?

NeilFranks avatar Aug 20 '22 01:08 NeilFranks

I am facing the same problem

VigneshBaskar avatar Aug 20 '22 06:08 VigneshBaskar

I am having the same issue

JamothyJame avatar Aug 21 '22 09:08 JamothyJame

Likewise. Someone needs to fix it ASAP. i'm noticing that the "demo" package is yellow-underlined so that might be why? Also, could it be because one or more of the widgets is being misidentified as a custom widget?

I can see some but not all of the widgets now.

JoePilliner avatar Aug 21 '22 14:08 JoePilliner

Hello, I am the author of demo.ipynb. I can see that the Tab widgets disappeared after running enable_custom_widget_manager() but I am not sure if there's any difference with or without disable_custom_widget_manager(). Could anyone reproduce it now?

@JoePilliner I think it's unrelated and it might be a bug in the linter Pyright. Prepending content. to the path silences the warning but causes an error. Maybe python.analysis.extraPaths is configured incorrectly

graphemecluster avatar Aug 28 '22 15:08 graphemecluster

For those who are facing the problem, do pip install ipywidgets==7.7.1 fix the issue?

graphemecluster avatar Aug 28 '22 16:08 graphemecluster

For those who are facing the problem, do pip install ipywidgets==7.7.1 fix the issue?

Thanks for the suggestion, I gave it a try and I could still only see some of the widgets. It seems like the widgets that aren't loading are the ones with images.

JoePilliner avatar Aug 31 '22 02:08 JoePilliner

@JoePilliner Thanks for the try, I think that's exactly what I saw with enable_custom_widget_manager(). Could you also try running disable_custom_widget_manager()?

graphemecluster avatar Aug 31 '22 04:08 graphemecluster

disable_custom_widget_manager()

Is there anything I need to preface that with? Colab isn't recognising the function.

JoePilliner avatar Sep 03 '22 03:09 JoePilliner

Oh, I'm sorry, I just thought you could get that by reading OP’s post. What I meant was output.disable_custom_widget_manager() (output should have already been imported from google.colab by the second cell, so try put it just below the import statements).

graphemecluster avatar Sep 04 '22 08:09 graphemecluster

@JoePilliner In which of the following cases does the error provided by the OP occur (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.), despite whether the fix works? (I can’t see the error message in any of the cases, so I need someone to reproduce it for me.)

  1. Nothing added
  2. With output.enable_custom_widget_manager() being added
  3. With output.disable_custom_widget_manager() being added

graphemecluster avatar Sep 05 '22 19:09 graphemecluster

@JoePilliner In which of the following cases does the error provided by the OP occur (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.), despite whether the fix works? (I can’t see the error message in any of the cases, so I need someone to reproduce it for me.)

Nothing added With output.enable_custom_widget_manager() being added With output.disable_custom_widget_manager() being added

Hi @graphemecluster, sorry to disappear on you. I've been busy with my day job and in my spare time I've been learning how to animate in case this workbook can't be fixed.

I haven't seen the error message posted by OP since the first couple of days of the demo not working. Enabling custom widgets, disabling them, or doing neither don't trigger the error message or make the missing UI elements appear.

Running !pip install pyyaml==5.4.1 after installing the other requirments doesn't fix the interface BUT if the Generate button is pressed it will generate a video using the default image/video combo, which means that the underlying program still works.

JoePilliner avatar Sep 26 '22 10:09 JoePilliner

@JoePilliner Thank you for taking the time to reply. Did you see any error messages in the console in the above 3 cases? In my case, I found that I got errors from (the file transpiled from) this line when custom widget manager is enabled. I wonder if we should open an issue there.

graphemecluster avatar Sep 27 '22 08:09 graphemecluster