简体   繁体   中英

wxPython GUI killed by enthought

I am writing a wxPython GUI. For certain functionality this requires that I use the Enthought distribution of python, but when I upgraded to Canopy it completely breaks my GUI. When I call up a certain window, everything freezes and I have to force quit. I don't get any kind of error message or traceback, just a freeze.

I am using the 64 bit Canopy, version 1.4.0.1938, and wxPython 2.9.2.4.

I am looking for either of two kinds of advice. 1. What is a good debugging protocol in this kind of situation? 2. How to get wxPython and Canopy to play nice?

I greatly appreciate any suggestions. I am happy to include any code that might be helpful, but I suspect that this is not particularly specific to my code.

edit: I need the Enthought distribution specifically because my GUI builds on older code that uses some of the data analysis and plotting that EPD provides. This GUI actually incorporates and streamlines several older GUIs for analyzing paleomagnetic data.

This question is inaccurately titled and both your question and your own answer to it are inaccurate and incomplete. On the evidence, and from your comments on the Enthought knowledge base , your problem is twofold:

1) You want to use WXPython 2.8 in 64-bit Python on OSX. This is a fundamental technical impossibility because WxPython 2.8 uses Carbon OSX graphics, which is not supported for OSX 64-bit programs.

2) Failing that, you expect your program to run unmodified with WxPython 2.9 but apparently you have not taken any steps to migrate it to WxPython 2.9. See http://wxpython.org/migrationguide.php .

(Edited 5/6/2014)

My temporary solution was installing the 32 bit version of Canopy and then using the Package Manager to install an older version of wxPython (2.8.10.1). This worked temporarily, until I was able to get to the actual cause of the error.

https://support.enthought.com/entries/22601196-wxPython?page=1#post_22146884

The real problem did indeed turn out to be the version of wxPython.

The specific issue was calling ShowModal() instead of simply Show() for the main window of the GUI, which apparently worked in wxPython 2.8 but caused a freeze in 2.9. The code now thankfully works with 64 bit Canopy. Thanks to Jonathan March for pointing me in the right direction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM