[Pythonmac-SIG] py2app + wxpython -> ImportError

Ronald Oussoren ronaldoussoren at mac.com
Thu Apr 14 11:48:12 CEST 2011


On 13 Apr, 2011, at 20:22, Christian K. wrote:

> Am 12.04.11 17:27, schrieb Ronald Oussoren:
>> 
>> On 11 Apr, 2011, at 22:29, Christian K. wrote:
>> 
>>> Am 11.04.11 21:11, schrieb Christian K.:
>>>> Am 11.04.11 08:08, schrieb Ronald Oussoren:
>>>>> 
>>>>> On 10 Apr, 2011, at 10:06, Christian K. wrote:
>>>> 
>>>>>> File "wx/lib/pubsub/pub.pyc", line 24, in<module>
>>>>>> File "wx/lib/pubsub/core/listener.pyc", line 13, in<module>
>>>>>> ImportError: No module named listenerimpl
>>>>>> 
>>>>>> I had (other) problems with pubsub using py2exe, too, and I needed to
>>>>>> add
>>>>>> 'wx.lib.pubsub' to the 'package' section of the setup options dict.
>>>>>> That did
>>>>>> not help py2app though.
>>>>>> 
>>>>>> Any ideas?
>>>>> 
>>>>> Adding "includes=['wx.lib.pubsub']" could help.
>>>> 
>>>> 
>>>> Thanks, but that did not change anything.
>>> 
>>> I got one step further by adding
>>> 
>>> 'includes':['wx.lib.pubsub.core.kwargs.*','wx.lib.pubsub.core.*']
>>> 
>>> then I unzipped site-packages.zip and copied the contents of
>>> wx.lib.pubsub.core.kwargs to wx.lib.pubsub.core
>>> 
>>> and now I get:
>>> 
>>> File "wx/_gdi.pyc", line 3753, in GetTextExtent
>>> wx._core.PyAssertionError: C++ assertion "Ok()" failed at /BUILD/wxPython-src-2.8.11.0/src/common/dcgraph.cpp(880) in DoGetTextExtent(): wxGCDC(cg)::DoGetTextExtent - invalid DC
>> 
>> Could you create a small program that demonstrates the problem?
> 
> Well, I found out (from the wxwidgets mailing-list) that this is related to not attaching a Bitmap to a MemoryDC, which I did though and the script runs from 'source', but I took that part out and the script crashes heavily some steps later.

This indicates that not everything that's needed is included in the app bundle. I won't be able to fix the issue without an example that demonstrates the problem, and sadly enough don't have time to create such an example myself (as I've stopped using wx myself and hadn't even heard of wx.lib.pubsub before your initial e-mail).

Ronald


> Which in the end brought me to stop trying to make an app.
> Thanks anyway.
> 
> Christian
> 
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG



More information about the Pythonmac-SIG mailing list