0

When I am using Python Widgets with the following code as described in the documentation https://test-widgets.readthedocs.io/en/latest/examples/Widget%20List.html:

import ipywidgets as widgets
widgets.Widget.widget_types.values()

Then the following error is thrown:

AttributeError: 'WidgetRegistry' object has no attribute 'values'
Ripi2
  • 7,031
  • 1
  • 17
  • 33
Rene B.
  • 6,557
  • 7
  • 46
  • 72

1 Answers1

0

The code was obsolete and widget_types has not anymore the method values(). You should use items() instead. Here is a possible solution:

for element in widgets.Widget.widget_types.items():       
    print element[0][2] + ' ----- ' + str(element[0][5])
Rene B.
  • 6,557
  • 7
  • 46
  • 72