Error using widgets in Jupyter Notebook


#1

Hi,

I cannot use widgets in Jupyter Notebooks anymore. I am systematically getting the following error. Has anything changed recently? How can I fix this?
Many thanks
Cyrille

    Failed to display Jupyter Widget of type FloatProgress.

  If you're reading this message in Jupyter Notebook or JupyterLab, it may mean
  that the widgets JavaScript is still loading. If this message persists, it
  likely means that the widgets JavaScript library is either not installed or
  not enabled. See the Jupyter
  Widgets Documentation for setup instructions.


  If you're reading this message in another notebook frontend (for example, a static
  rendering on GitHub or NBViewer),
  it may mean that your frontend doesn't currently support widgets.

#2

Hi Cyrille,

Could you point us to an example? We recently had a minor change in the notebook environment, which should not have affected the widgets. If I could have a sample to reproduce the error I could compare the behaviour between the two environments.

Thanks,
Akos


#3

Hi Akos, thanks for the reply. You can try this one:
https://collab.humanbrainproject.eu/#/collab/5403/nav/42112
I was trying to access it right now, but I am getting a 500 error.


#4

Hello Cyrille,

You upgrade libraries in your notebook, even ones that run the notebooks themselves: pip install --upgrade upgrades ALL dependencies of your package, including the notebook package which is the core library here.
Even without the --upgrade switch, your package pulls in a 7.X ipywidgets module, after which you re-enable the notebook extension with the newer version. This is where things break.

If you execute the following code in the default environment you see that the widgets in the default environment are working fine:

from ipywidgets import widgets
from IPython.display import *
from ipywidgets import *
tbox=Text()
tbox.description='mybox'
display(tbox)

In short, the default environment is fine, however the changes you are making are breaking it. Please write an email to platform@humanbrainproject.eu so we can fix your environment.

Thanks,
Akos


#5

Many thank Akos.
Unfortunately, my notebook is still returning a 500 error. I tried to add a new notebook in my Collab but this also is failing with the same error.
Can you help there?
Regards,
Cyrille


#6

Hi Cyrille,

I reset your environment to the initial state. If your problem persists please write an email to platform@humanbrainproject.eu.

Thanks,
Akos