Skip to content

'VBox' object has no attribute '_ipython_display_' #607

@viniciusdc

Description

@viniciusdc

What happened:

Received AttributeError: 'VBox' object has no attribute '_ipython_display_' when calling cluster_options from within a Jupyter notebook.
image (1)

What you expected to happen:

The options widget should be shown correctly, as expected.

Minimal Complete Verifiable Example:

from dask_gateway import Gateway

gt = Gateway()
options = gt.cluster_options()
options

Anything else we need to know?:

Environment:

  • dask-gateway: 2022.4.0
  • Dask version: 2022.4.2
  • Python version: 3.9.13
  • Operating System: Linux
  • Install method (conda, pip, source): conda

Extra

The reason for the above issue seems to be that Ipywidgets latest available version 8.0.0 removed the on_display method in place of _repr_mimebundle_ (see ref.) and the Dask-gateway client still uses the old call:

def _ipython_display_(self, **kwargs):
widget = self._widget()
if widget is not None:
return widget._ipython_display_(**kwargs)
else:
from IPython.display import display
data = {"text/plain": repr(self), "text/html": self._repr_html_()}
display(data, raw=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions