yWorks/yfiles-jupyter-graphs

Exception with ipywidgets 8 - AttributeError: 'super' object has no attribute '_ipython_display_'

fskpf opened this issue · 1 comments

fskpf commented

Describe the bug
Widget fails with AttributeError: 'super' object has no attribute '_ipython_display_'

To Reproduce
For example, install the widget in a fresh environment:

$ conda create -n currentlab -c conda-forge python jupyterlab
$ conda activate currentlab
$ pip install yfiles-jupyter-graphs

Then inspect the ipywidgets version that has been installed implicitly by the yfiles-jupyter-graphswidget

$ pip list

It'll show ipywidgets 8.x.x.

Then try to run the widget in a jupyter lab notebook. Among other errors, it'll throw AttributeError: 'super' object has no attribute '_ipython_display_'

Expected behavior
It should just work.

fskpf commented

ipywidgets 8 is incompatible with the current widget.

For now, we should at least limit the required version of ipywidgets to the compatible version range. Currently, it just states

    install_requires=[
        'ipywidgets>=7.6.0'
    ],

Which installs the current, incompatible version 8 of ipywidgets.

This should be changed to

    install_requires=[
        'ipywidgets>=7.6.0,<8'
    ],

Eventually, we should also make it compatible with ipywidgets 8, see #19.