6.4.1 not compatible with python-envisage 6.1.0
dvzrv opened this issue · 3 comments
dvzrv commented
Hi! As observed in enthought/mayavi#1201, mayavi currently does not work because traits 6.4.1 is not compatible with envisage >= 6.1.0:
ERROR|2023-02-06 17:50:30,771|getting extensions from Plugin(id='envisage.ui.workbench', name='Workbench'), trait <my_action_sets>
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/envisage/plugin.py", line 326, in _get_extensions_from_trait
extensions = getattr(self, trait_name)
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/workbench_plugin.py", line 185, in _my_action_sets_default
from .default_action_set import DefaultActionSet
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/default_action_set.py", line 21, in <module>
class DefaultActionSet(ActionSet):
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/default_action_set.py", line 25, in DefaultActionSet
Menu(
File "/usr/lib/python3.10/site-packages/traits/trait_types.py", line 2695, in validate
return TraitListObject(self, object, name, value)
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 584, in __init__
super().__init__(
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 867, in _item_validator
return trait_validator(object, self.name, value)
File "/usr/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'groups' trait of a Menu instance must be a Group or None, but a value of 'OpenGroup' <class 'str'> was specified.
Traceback (most recent call last):
File "/usr/bin/mayavi2", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.10/site-packages/mayavi/scripts/mayavi2.py", line 600, in main
mayavi.main(sys.argv[1:])
File "/usr/lib/python3.10/site-packages/mayavi/plugins/app.py", line 197, in main
app.run()
File "/usr/lib/python3.10/site-packages/mayavi/plugins/mayavi_workbench_application.py", line 81, in run
window.open()
File "/usr/lib/python3.10/site-packages/pyface/workbench/workbench_window.py", line 159, in open
self._create()
File "/usr/lib/python3.10/site-packages/pyface/ui/qt4/application_window.py", line 138, in _create
self._create_trim_widgets(self.control)
File "/usr/lib/python3.10/site-packages/pyface/i_application_window.py", line 155, in _create_trim_widgets
self._create_menu_bar(parent)
File "/usr/lib/python3.10/site-packages/pyface/ui/qt4/application_window.py", line 79, in _create_menu_bar
if self.menu_bar_manager is not None:
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/workbench_window.py", line 106, in _menu_bar_manager_default
return self._action_manager_builder.create_menu_bar_manager("MenuBar")
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/workbench_window.py", line 224, in __action_manager_builder_default
window=self, action_sets=self.action_sets
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/workbench_window.py", line 168, in _action_sets_default
return [factory(window=self) for factory in self._action_sets]
File "/usr/lib/python3.10/site-packages/envisage/extension_point.py", line 122, in get
extensions = extension_registry.get_extensions(self.id)
File "/usr/lib/python3.10/site-packages/envisage/application.py", line 203, in get_extensions
return self.extension_registry.get_extensions(extension_point_id)
File "/usr/lib/python3.10/site-packages/envisage/extension_registry.py", line 110, in get_extensions
return self._get_extensions(extension_point_id)[:]
File "/usr/lib/python3.10/site-packages/envisage/provider_extension_registry.py", line 99, in _get_extensions
extensions = self._initialize_extensions(extension_point_id)
File "/usr/lib/python3.10/site-packages/envisage/provider_extension_registry.py", line 279, in _initialize_extensions
extensions.append(provider.get_extensions(extension_point_id)[:])
File "/usr/lib/python3.10/site-packages/envisage/plugin.py", line 137, in get_extensions
extensions = self._get_extensions_from_trait(trait_names[0])
File "/usr/lib/python3.10/site-packages/envisage/plugin.py", line 326, in _get_extensions_from_trait
extensions = getattr(self, trait_name)
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/workbench_plugin.py", line 185, in _my_action_sets_default
from .default_action_set import DefaultActionSet
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/default_action_set.py", line 21, in <module>
class DefaultActionSet(ActionSet):
File "/usr/lib/python3.10/site-packages/envisage/ui/workbench/default_action_set.py", line 25, in DefaultActionSet
Menu(
File "/usr/lib/python3.10/site-packages/traits/trait_types.py", line 2695, in validate
return TraitListObject(self, object, name, value)
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 584, in __init__
super().__init__(
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/usr/lib/python3.10/site-packages/traits/trait_list_object.py", line 867, in _item_validator
return trait_validator(object, self.name, value)
File "/usr/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'groups' trait of a Menu instance must be a Group or None, but a value of 'OpenGroup' <class 'str'> was specified.
The downstream package on Arch Linux is also affected by this: https://bugs.archlinux.org/task/77385
dvzrv commented
Other relevant downstream ticket: https://bugs.archlinux.org/task/77409
mdickinson commented
Thanks for the report. This is an Envisage bug, which is fixed in the Envisage main
branch (see enthought/envisage#485). We're waiting on resources to make an Envisage release. I'll close here.
mdickinson commented
Followup: I've made an Envisage bugfix release. https://pypi.org/project/envisage/6.1.1/