簡體   English   中英

Enthought Mayavi嵌入了wx問題

[英]Enthought Mayavi embedding with wx problems

起初我的運行系統:

我從存儲庫中使用Windows 8 Pro和Mayavi 4.3以及在Python 2.7.4中使用wxPython 2.9.4.0但是從EPD包中也遇到了與mayavi 4.2.1相同的問題...

當我嘗試將mayavi嵌入筆記本電腦面板時,我遇到了一些UI問題。 即使在mayavi的演示文件中,我也得到了mayavi生成的外部幀的奇怪行為。

因此,使用設置按鈕將打開設置窗口。 此外,場景對使用設置更改的參數做出反應。 但單擊確定或臨時后窗口不會關閉。 並且python返回了幾條錯誤消息。 當我通過實現mlab.show_pipeline()命令使用管道時,出現了類似的行為。

這種行為也可以在來自enthought網頁樣本中找到。

嘗試在enthougth示例的設置框架中單擊“確定”后,您可以在此處看到我的錯誤消息:

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

提前致謝

Mayvi與wx 2.9不兼容。

更多信息: https//support.enthought.com/entries/22601196-wxPython

請使用enpkg恢復為EPD附帶的wx 2.8。

至少可以通過與此PR相關的更改來解決此特定異常: https//github.com/enthought/traitsui/pull/108 我還不知道Mayavi和其他堆棧,但是這個改變至少會讓traitsui使用wxPython 2.9。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM