[Pythonmac-SIG] newbie py2app problem - "ImportError: no module named code"
Robin Dunn
robin at alldunn.com
Sat Apr 5 08:55:41 CEST 2008
anonymous user wrote:
> Traceback (most recent call last):
> File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/__boot__.py", line 137, in <module>
> _run('driver.py')
> File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/__boot__.py", line 134, in _run
> execfile(path, globals(), globals())
> File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/driver.py", line 14, in <module>
> from wx import *
> AttributeError: 'module' object has no attribute 'build'
> 2008-04-04 16:31:31.999 driver[3152] driver Error
> 2008-04-04 16:31:32.000 driver[3152] driver Error
> An unexpected error has occurred during execution of the main script
>
> AttributeError: 'module' object has no attribute 'build'
>
It should work if you use "import wx" and not "from wx import *". The
problem has something to do with the build subpackage being included in
the __all__ list in wx/__init__.py, but since doing the import
"properly" avoids the problem I haven't worried about it very much.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the Pythonmac-SIG
mailing list