enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.32k stars 286 forks source link

mlab related tests fail #785

Open priyanka1023 opened 5 years ago

priyanka1023 commented 5 years ago

after installing mayavi using pip in python 2.7 environment the followng four test failed. 1.test_mlab.py 2.test_mlab_savefig.py 3.test_mlab_show.py 4.test_mlab_envisage.py Pyside version 1.2.4

test_mlab.py


Exception occurred in traits notification handler.
Please check the log file for details.
Exception occurred in traits notification handler for object: <mayavi.tools.animator.Animator object at 0x7f92d631e770>, trait: delay, old value: 500, new value: 10
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 394, in __call__
    self.handler(*args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/mayavi/tools/animator.py", line 121, in _delay_changed
    if t.IsRunning():
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py", line 68, in IsRunning
    return self.is_running
AttributeError: 'Timer' object has no attribute 'is_running'
ERROR|2019-05-28 15:24:54,923|Exception occurred in traits notification handler for object: <mayavi.tools.animator.Animator object at 0x7f92d631e770>, trait: delay, old value: 500, new value: 10
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 394, in __call__
    self.handler(*args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/mayavi/tools/animator.py", line 121, in _delay_changed
    if t.IsRunning():
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py", line 68, in IsRunning
    return self.is_running
AttributeError: 'Timer' object has no attribute 'is_running'

failures=1
Exception
In /localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py:68
AttributeError: 'Timer' object has no attribute 'is_running' (in IsRunning)
ERROR|2019-05-28 15:24:54,925|Exception
In /localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py:68
AttributeError: 'Timer' object has no attribute 'is_running' (in IsRunning)
Traceback (most recent call last):
  File "/localhome/administrator/mayavi/integrationtests/mayavi/common.py", line 549, in run
    self.do()
  File "test_mlab.py", line 77, in do
    run_mlab_examples()
  File "test_mlab.py", line 50, in run_mlab_examples
    while is_timer_running(obj.timer):
  File "test_mlab.py", line 25, in is_timer_running
    return timer.IsRunning()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py", line 68, in IsRunning
    return self.is_running
AttributeError: 'Timer' object has no attribute 'is_running'

test_mlab_savefig.py


.E
======================================================================
ERROR: test_mlab_screenshot (__main__.TestMlabSavefigUnitTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_mlab_savefig.py", line 95, in test_mlab_screenshot
    data = screenshot(mode='rgb', antialiased=aa)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/mayavi/tools/figure.py", line 352, in screenshot
    out.shape = shape
ValueError: cannot reshape array of size 12 into shape (0,0,3)

----------------------------------------------------------------------
Ran 2 tests in 2.379s

FAILED (errors=1)

test_mlab_show.py

Exception occurred in traits notification handler.
Please check the log file for details.
Exception occurred in traits notification handler for object: <mayavi.tools.animator.Animator object at 0x7f4011cd9e30>, trait: delay, old value: 500, new value: 10
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 394, in __call__
    self.handler(*args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/mayavi/tools/animator.py", line 121, in _delay_changed
    if t.IsRunning():
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py", line 68, in IsRunning
    return self.is_running
AttributeError: 'Timer' object has no attribute 'is_running'
Traceback (most recent call last):
  File "test_mlab_show.py", line 32, in <module>
    test_mlab_show()
  File "test_mlab_show.py", line 17, in test_mlab_show
    run_mlab_examples()
  File "/localhome/administrator/mayavi/integrationtests/mayavi/test_mlab.py", line 50, in run_mlab_examples
    while is_timer_running(obj.timer):
  File "/localhome/administrator/mayavi/integrationtests/mayavi/test_mlab.py", line 25, in is_timer_running
    return timer.IsRunning()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/timer/timer.py", line 68, in IsRunning
    return self.is_running
AttributeError: 'Timer' object has no attribute 'is_running'
Exception TypeError: "'NoneType' object is not callable" in <function <lambda> at 0x7f40148247d0> ignored
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  10 (X_UnmapWindow)
  Resource id in failed request:  0x2800018
  Serial number of failed request:  68
  Current serial number in output stream:  70

test_mlab_envisage.py

Exception occurred in traits notification handler for object: <mayavi.plugins.envisage_engine.EnvisageEngine object at 0x7f3a42c4b770>, trait: children_ui_list, old value: scenes_items, new value: [<mayavi.core.scene.Scene object at 0x7f3a40175d10>]
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 591, in _dispatch_change_event
    self.dispatch(handler, *args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 695, in dispatch
    handler(*args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 1530, in _children_replaced
    self._append_node(nid, child_node, child)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 415, in _append_node
    return self._insert_node(nid, None, node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 432, in _insert_node
    self._add_listeners(node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 634, in _add_listeners
    node.when_label_changed(object, self._label_updated, False)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1516, in when_label_changed
    return object.tno_when_label_changed(self, listener, remove)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1898, in tno_when_label_changed
    self._listener_cache[memo] = wrapped_listener
AttributeError: 'Scene' object has no attribute '_listener_cache'
ERROR|2019-05-28 15:27:03,572|Exception occurred in traits notification handler for object: <mayavi.plugins.envisage_engine.EnvisageEngine object at 0x7f3a42c4b770>, trait: children_ui_list, old value: scenes_items, new value: [<mayavi.core.scene.Scene object at 0x7f3a40175d10>]
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 591, in _dispatch_change_event
    self.dispatch(handler, *args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traits/trait_notifiers.py", line 695, in dispatch
    handler(*args)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 1530, in _children_replaced
    self._append_node(nid, child_node, child)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 415, in _append_node
    return self._insert_node(nid, None, node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 432, in _insert_node
    self._add_listeners(node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 634, in _add_listeners
    node.when_label_changed(object, self._label_updated, False)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1516, in when_label_changed
    return object.tno_when_label_changed(self, listener, remove)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1898, in tno_when_label_changed
    self._listener_cache[memo] = wrapped_listener
AttributeError: 'Scene' object has no attribute '_listener_cache'
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 962, in _on_item_expanded
    self._expand_node(nid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 515, in _expand_node
    self._append_node(nid, child_node, child)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 415, in _append_node
    return self._insert_node(nid, None, node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 432, in _insert_node
    self._add_listeners(node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 634, in _add_listeners
    node.when_label_changed(object, self._label_updated, False)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1516, in when_label_changed
    return object.tno_when_label_changed(self, listener, remove)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1898, in tno_when_label_changed
    self._listener_cache[memo] = wrapped_listener
AttributeError: 'ArraySource' object has no attribute '_listener_cache'
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 962, in _on_item_expanded
    self._expand_node(nid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 515, in _expand_node
    self._append_node(nid, child_node, child)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 415, in _append_node
    return self._insert_node(nid, None, node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 432, in _insert_node
    self._add_listeners(node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 634, in _add_listeners
    node.when_label_changed(object, self._label_updated, False)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1516, in when_label_changed
    return object.tno_when_label_changed(self, listener, remove)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1898, in tno_when_label_changed
    self._listener_cache[memo] = wrapped_listener
AttributeError: 'ModuleManager' object has no attribute '_listener_cache'
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 962, in _on_item_expanded
    self._expand_node(nid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 515, in _expand_node
    self._append_node(nid, child_node, child)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 415, in _append_node
    return self._insert_node(nid, None, node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 432, in _insert_node
    self._add_listeners(node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 634, in _add_listeners
    node.when_label_changed(object, self._label_updated, False)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1516, in when_label_changed
    return object.tno_when_label_changed(self, listener, remove)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1898, in tno_when_label_changed
    self._listener_cache[memo] = wrapped_listener
AttributeError: 'IsoSurface' object has no attribute '_listener_cache'
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/ui/qt4/gui.py", line 200, in _dispatch
    self._callable(*self._args, **self._kw)
  File "test_mlab_envisage.py", line 9, in close
    e.window.close()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/workbench/workbench_window.py", line 180, in close
    self.destroy_views(self.views)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/workbench/workbench_window.py", line 339, in destroy_views
    view.destroy_control()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/workbench/traits_ui_view.py", line 72, in destroy_control
    self.ui.dispose()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/ui.py", line 256, in dispose
    self.finish()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/ui.py", line 283, in finish
    self.reset(destroy=False)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/ui.py", line 325, in reset
    editor.dispose()
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 260, in dispose
    self._delete_node(self._tree.invisibleRootItem())
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 457, in _delete_node
    self._delete_node(cnid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 457, in _delete_node
    self._delete_node(cnid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 457, in _delete_node
    self._delete_node(cnid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 457, in _delete_node
    self._delete_node(cnid)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 481, in _delete_node
    self._remove_listeners(node, object)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/qt4/tree_editor.py", line 650, in _remove_listeners
    node.when_label_changed(object, self._label_updated, True)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1516, in when_label_changed
    return object.tno_when_label_changed(self, listener, remove)
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/traitsui/tree_node.py", line 1900, in tno_when_label_changed
    wrapped_listener = self._listener_cache.pop(memo, None)
AttributeError: 'IsoSurface' object has no attribute '_listener_cache'
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/ui/qt4/workbench/workbench_window_layout.py", line 618, in sizeHint
    sh = self.centralWidget().sizeHint()
AttributeError: 'NoneType' object has no attribute 'sizeHint'
Traceback (most recent call last):
  File "/localhome/administrator/.virtualenvs/cv/local/lib/python2.7/site-packages/pyface/ui/qt4/workbench/workbench_window_layout.py", line 618, in sizeHint
    sh = self.centralWidget().sizeHint()
AttributeError: 'NoneType' object has no attribute 'sizeHint'

Any idea what could be the underlying issue?

corranwebster commented 5 years ago

The is_running Timer issue looks like a bug in Pyface. Can you please open a ticket there.

corranwebster commented 5 years ago

The issue with the Scene object is a known bug in the most recent release of TraitsUI that is fixed in master.

To resolve at least 2 of these issues, the simplest may be to base yourself off of Pyface 6.0 and TraitsUI 6.0 until there are bugfix releases.

priyanka1023 commented 5 years ago

Thanks a lot. Changing Pyface and TraitsUi solved three of the issues. But still test_mlab_savefig.py test still fails with the same error. Do you have any idea what could be the issue?