Question

At first my running system:

I use Windows 8 Pro and Mayavi 4.3 from the repository together with wxPython 2.9.4.0 at Python 2.7.4 but also had the same issue with mayavi 4.2.1 from the EPD package...

As I try to embedd mayavi into a notebook panel I get some problems with the UI. Even in the demo file from mayavi I got the same strange behavior of external frames generated by mayavi.

So using the settings button a the settings window opens. Also the scene reacts on the parameters I changed using the settings. But after clicking OK or chancel the window does not close. And python gives back several error messages. A simular behavior was there as i used the pipeline by implenting mlab.show_pipeline() command.

This behaivior is could be found on the sample from the enthought web page too.

Here you can see my error message after trying to click OK in the settings frame of the enthougth example:

C:\my_directory\>python wx_embedding.py
C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\wx\toolkit.py:35: wxPyDeprecationWarning: Using deprecated class PySimpleApp.
 _app = wx.PySimpleApp()

wx_embedding.py:63: wxPyDeprecationWarning: Using deprecated class PySimpleApp.
app = wx.PySimpleApp()

Traceback (most recent call last): File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\wx\ui_live.py", line 360, in _on_ok
self.close( wx.ID_OK )

File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\wx\ui_live.py", line 320, in close

ui.finish()
File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\ui.py", line 264, in finish

self.reset( destroy = True )
File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\ui.py", line 304, in reset
editor.dispose()
File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\wx\instance_editor.py", line 208, in dispose
self._ui.dispose()

File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\ui.py", line 237, in dispose
self.finish()
File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\ui.py", line 264, in finish
self.reset( destroy = True )

File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\ui.py", line 318, in reset
toolkit().destroy_children( self.control )
File "C:\Python27\lib\site-packages\enthougth_development_mayavi_git\traitsui\traitsui\wx\toolkit.py", line 474, in destroy_children
control.DestroyChildren()

File "C:\Python27\lib\site-packages\wx-2.9.4-msw\wx\_core.py", line 9203, in DestroyChildren
return _core_.Window_DestroyChildren(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "GetEventHandler() == this" failed at .    .\..\src\common\wincmn.cpp(468) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed

Thanks in advance

Was it helpful?

Solution

Mayvi is not compatible with wx 2.9.

More info here: https://support.enthought.com/entries/22601196-wxPython

Please use enpkg to revert to wx 2.8 which ships with EPD.

OTHER TIPS

At least this particular exception can be solved with the changes associated with this PR: https://github.com/enthought/traitsui/pull/108. I don't know about Mayavi and the rest of the stack yet, but that change will at least get traitsui working with wxPython 2.9.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top