I have some code that does 3D visualisation and it always worked fine. With traits 6.1.1 the visualisation works although it returns the following warning:
Failed to establish dbus connection/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/observation/_has_traits_helpers.py:70: RuntimeWarning: Trait '_wrappers' (trait type: List) on class ActionItem is defined with comparison_mode=<ComparisonMode.equality: 2>. Mutations and extended traits cannot be observed if a new container compared equally to the old one is set. Redefine the trait with List(..., comparison_mode=<ComparisonMode.identity: 1>) to avoid this.
warnings.warn(
/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/observation/_has_traits_helpers.py:70: RuntimeWarning: Trait '_wrappers' (trait type: List) on class ActionItem is defined with comparison_mode=<ComparisonMode.equality: 2>. Mutations and extended traits cannot be observed if a new container compared equally to the old one is set. Redefine the trait with List(..., comparison_mode=<ComparisonMode.identity: 1>) to avoid this.
warnings.warn(
But with traits 6.2 it fails and returns the following error:
Failed to establish dbus connection2021-11-30 11:44:56,607 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.modules.IsoSurfaceFactory object at 0x7f6fade61720>, trait: contours, old value: 5, new value: [-0.01, 0.01]
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 342, in __call__
self.handler(*args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -2.8290232876315713e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:44:56,608 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.mlab_scene_model.MlabSceneModel object at 0x7f6fadf9f310>, trait: activated, old value: <undefined>, new value: True
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 524, in _dispatch_change_event
self.dispatch(handler, *args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 486, in dispatch
handler(*args)
File "/home/juanma/Projects/electrondensity2/orbkit/orbkit/output/mayavi_interface.py", line 91, in update_plot
self.plot0 = self.scene.mlab.pipeline.iso_surface(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 38, in the_function
factory = factory_class(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 162, in __init__
super(DataModuleFactory, self).__init__(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 163, in __init__
self.trait_set(**traits)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 183, in trait_set
callback()
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -2.8290232876315713e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:24,473 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.modules.IsoSurfaceFactory object at 0x7f6fae1aaae0>, trait: contours, old value: 5, new value: [-0.01, 0.01]
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 342, in __call__
self.handler(*args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -2.9994771466590464e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:24,473 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.mlab_scene_model.MlabSceneModel object at 0x7f6fadb74cc0>, trait: activated, old value: <undefined>, new value: True
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 524, in _dispatch_change_event
self.dispatch(handler, *args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 486, in dispatch
handler(*args)
File "/home/juanma/Projects/electrondensity2/orbkit/orbkit/output/mayavi_interface.py", line 91, in update_plot
self.plot0 = self.scene.mlab.pipeline.iso_surface(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 38, in the_function
factory = factory_class(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 162, in __init__
super(DataModuleFactory, self).__init__(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 163, in __init__
self.trait_set(**traits)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 183, in trait_set
callback()
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -2.9994771466590464e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:26,125 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.modules.IsoSurfaceFactory object at 0x7f6fade4d090>, trait: contours, old value: 5, new value: [-0.01, 0.01]
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 342, in __call__
self.handler(*args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -4.0046797948889434e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:26,126 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.mlab_scene_model.MlabSceneModel object at 0x7f6fad8e0f40>, trait: activated, old value: <undefined>, new value: True
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 524, in _dispatch_change_event
self.dispatch(handler, *args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 486, in dispatch
handler(*args)
File "/home/juanma/Projects/electrondensity2/orbkit/orbkit/output/mayavi_interface.py", line 91, in update_plot
self.plot0 = self.scene.mlab.pipeline.iso_surface(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 38, in the_function
factory = factory_class(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 162, in __init__
super(DataModuleFactory, self).__init__(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 163, in __init__
self.trait_set(**traits)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 183, in trait_set
callback()
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -4.0046797948889434e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:26,628 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.modules.IsoSurfaceFactory object at 0x7f6fad80f130>, trait: contours, old value: 5, new value: [-0.01, 0.01]
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 342, in __call__
self.handler(*args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -2.6075649657286704e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:26,629 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.mlab_scene_model.MlabSceneModel object at 0x7f6fad777e00>, trait: activated, old value: <undefined>, new value: True
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 524, in _dispatch_change_event
self.dispatch(handler, *args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 486, in dispatch
handler(*args)
File "/home/juanma/Projects/electrondensity2/orbkit/orbkit/output/mayavi_interface.py", line 91, in update_plot
self.plot0 = self.scene.mlab.pipeline.iso_surface(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 38, in the_function
factory = factory_class(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 162, in __init__
super(DataModuleFactory, self).__init__(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 163, in __init__
self.trait_set(**traits)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 183, in trait_set
callback()
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -2.6075649657286704e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:27,063 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.modules.IsoSurfaceFactory object at 0x7f6fad7266d0>, trait: contours, old value: 5, new value: [-0.01, 0.01]
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 342, in __call__
self.handler(*args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -4.944820830132812e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
2021-11-30 11:45:27,063 - traits - ERROR - Exception occurred in traits notification handler for object: <mayavi.tools.mlab_scene_model.MlabSceneModel object at 0x7f6fae276e00>, trait: activated, old value: <undefined>, new value: True
Traceback (most recent call last):
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 524, in _dispatch_change_event
self.dispatch(handler, *args)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_notifiers.py", line 486, in dispatch
handler(*args)
File "/home/juanma/Projects/electrondensity2/orbkit/orbkit/output/mayavi_interface.py", line 91, in update_plot
self.plot0 = self.scene.mlab.pipeline.iso_surface(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 38, in the_function
factory = factory_class(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 162, in __init__
super(DataModuleFactory, self).__init__(*args, **kwargs)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 163, in __init__
self.trait_set(**traits)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/pipe_base.py", line 183, in trait_set
callback()
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/mayavi/tools/modules.py", line 185, in _contours_changed
self._target.contour.contours = self.contours
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
return TraitListObject(self, object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
super().__init__(
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
return trait_validator(object, self.name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/trait_types.py", line 1975, in _validate
self.error(object, name, value)
File "/home/juanma/.conda/envs/electrondensity/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'contours' trait of a Contour instance must be -4.944820830132812e-06 <= a number <= 0.9998999834060669, but a value of -0.01 <class 'float'> was specified.
I have some code that does 3D visualisation and it always worked fine. With traits 6.1.1 the visualisation works although it returns the following warning:
But with traits 6.2 it fails and returns the following error: