Bug on OS X 10.7.0 and 10.8.0 using 2.8.11.0

Hi,

Python 2.6.2
wxPython 2.8.11.0

My application is reporting this bug on 10.7.0 and 10.8.0

----- System Info -----
(‘Darwin’, ‘Petr-Ludviks-iMac.local’, ‘10.8.0’, ‘Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386’, ‘i386’, ‘i386’)

----- Details -----
Traceback (most recent call last): File “core/wxx/lib/buttons.pyc”, line 121, in DoGetBestSize
File “core/wxx/lib/buttons.pyc”, line 477, in _GetLabelSize
File “wx/_core.pyc”, line 8513, in GetLabel
wx._core.PyAssertionError: C++ assertion “status == noErr” failed at /BUILD/wxPython-src-2.8.11.0/src/mac/carbon/font.cpp(489) in MacFindFont(): couldn’t modify ATSU style

I am on 10.5.5. Any idea how to resolve the issue?
This bug is reported by few users compare to number of downloads on OS X. I have no idea whether it’s a permanent
bug on 10.7.0 or 10.8.0 or only few systems are reporting this.

Cheers

Prashant

Hi,

Python 2.6.2
wxPython 2.8.11.0

My application is reporting this bug on 10.7.0 and 10.8.0

Wow, did you use a time machine to go to the future and get 10.8? :wink:

----- System Info -----
('Darwin', 'Petr-Ludviks-iMac.local', '10.8.0', 'Darwin Kernel Version
10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386',
'i386', 'i386')

----- Details -----
Traceback (most recent call last): File "core/wxx/lib/buttons.pyc", line
121, in DoGetBestSize
File "core/wxx/lib/buttons.pyc", line 477, in _GetLabelSize
File "wx/_core.pyc", line 8513, in GetLabel
wx._core.PyAssertionError: C++ assertion "status == noErr" failed at
/BUILD/wxPython-src-2.8.11.0/src/mac/carbon/font.cpp(489) in
MacFindFont(): couldn't modify ATSU style

I am on 10.5.5. Any idea how to resolve the issue?

Try upgrading to wxPython 2.8.12.1

···

On 10/8/11 8:56 PM, King wrote:

--
Robin Dunn
Software Craftsman

Hi,

Python 2.6.2
wxPython 2.8.11.0

My application is reporting this bug on 10.7.0 and 10.8.0
Wow, did you use a time machine to go to the future and get 10.8? :wink:

----- System Info -----
(‘Darwin’, ‘Petr-Ludviks-iMac.local’, ‘10.8.0’, ‘Darwin Kernel Version
10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386’,
‘i386’, ‘i386’)

----- Details -----
Traceback (most recent call last): File “core/wxx/lib/buttons.pyc”, line
121, in DoGetBestSize
File “core/wxx/lib/buttons.pyc”, line 477, in _GetLabelSize
File “wx/_core.pyc”, line 8513, in GetLabel
wx._core.PyAssertionError: C++ assertion “status == noErr” failed at
/BUILD/wxPython-src-2.8.11.0/src/mac/carbon/font.cpp(489) in
MacFindFont(): couldn’t modify ATSU style

I am on 10.5.5. Any idea how to resolve the issue?

Try upgrading to wxPython 2.8.12.1

Is this really required? I would prefer to use existing version until final release. If this bug is resolved in python scripts then I would modify core scripts.
Another option would be to install new version along with existing version. I have never used two version of wxpython at the same time. Please provide me some links to the articles explaining how to use install two versions and use the one you would want to.

Cheers

Prashant

···

On Sunday, 9 October 2011 13:27:07 UTC+5:30, Robin Dunn wrote:

On 10/8/11 8:56 PM, King wrote:

Ok,

I followed this article:
http://wiki.wxpython.org/MultiVersionInstalls

I have installed newer version 2.8.12.1. Older version is 2.8.11.0.
Now “import wx” automatically imports the latest version 2.8.12.1.

In order to use older version, I tried replacing path in this file:
Library/Frameworks/python.framework/versions/2.6/lib/python2.6/site-packages/wxredirect.pth

current line:
import site: site.addsitedir(’/usr/local/lib/wxpython-unicode-2.8.12.1/lib/python.26’)
changed line:
import site: site.addsitedir(’/usr/local/lib/wxpython-unicode-2.8.11.0/lib/python.26’)

Now “import wx” fails.
Instead of using “import wxversion” method, I would prefer to use path changing method. How do I do it?

Cheers

Prashant

Yes. If it's the issue I am thinking of then its fix was way deep in the C++ code.

···

On 10/9/11 4:53 AM, King wrote:

    Try upgrading to wxPython 2.8.12.1

Is this really required?

--
Robin Dunn
Software Craftsman

Ok,

I followed this article:
MultiVersionInstalls - wxPyWiki

I have installed newer version 2.8.12.1. Older version is 2.8.11.0.
Now "import wx" automatically imports the latest version 2.8.12.1.

In order to use older version, I tried replacing path in this file:
Library/Frameworks/python.framework/versions/2.6/lib/python2.6/site-packages/wxredirect.pth

current line:
import site:
site.addsitedir('/usr/local/lib/wxpython-unicode-2.8.12.1/lib/python.26')
changed line:
import site:
site.addsitedir('/usr/local/lib/wxpython-unicode-2.8.11.0/lib/python.26')

Now "import wx" fails.

I have done this with 2.8 and 2.9 versions of wxPython, and it does work well. But I've never tried it with two 2.8 versions... What kind of failure do you get? Any tracebacks or other messages? Perhaps the two versions of wxMac are conflicting with each other.

Something else you may want to try is to use Virtualenv. You have to jump through a couple hoops to get it to work with wxPython code, because the virtualenv hides the fact than a Framework and Application Bundle build of Python is being used. I've documented a How-To here: wxPythonVirtualenvOnMac - wxPyWiki You could make two virtualenv's and use a different wxPython in each one (using a .pth file to point to each as you are trying to do already). Then you can select wxPython version simply by executing a different (virtual) python.

Instead of using "import wxversion" method, I would prefer to use path
changing method. How do I do it?

wxversion doesn't work on Mac anyway because of some concessions I made when setting things up to be able to work with both the Python.org version of Python and Apple's version.

···

On 10/9/11 6:35 AM, King wrote:

--
Robin Dunn
Software Craftsman

Thanks Robin,

Let me check 2.8.12.1 along with my app, so far no problems or bug have been reported. If every thing goes well then I’ll shift to 2.8.12.1.

The error is as simple as it goes:
“no module name wx”

Let me know about a bit more about “wxredirect.pth” file and wx python module to look in, I’ll give try to solve the issue.

Cheers

Prashant

wxredirect.pth is placed in the default site-packages dir for both Apple's Python and the Python that is installed using Python.org's installers. It calls site.addsitedir(...) to add a new location that Python will look in for .pth files. The wxPython installer will also install another .pth file in the dir passed to addsitedir which adds those wxPython specific folders to the sys.path, and also executes a bit of code to move those items from the end of the list to the end of any items added from PYTHONPATH. This way the desired wxPython is found before the one installed by Apple, but it can still be overridden by the user setting PYTHONPATH.

···

On 10/15/11 3:43 AM, King wrote:

Thanks Robin,

Let me check 2.8.12.1 along with my app, so far no problems or bug have
been reported. If every thing goes well then I'll shift to 2.8.12.1.

The error is as simple as it goes:
"no module name wx"

Let me know about a bit more about "wxredirect.pth" file and wx python
module to look in, I'll give try to solve the issue.

--
Robin Dunn
Software Craftsman