[Pythonmac-SIG] py2app error when launching built app

Alex Honeywell alex.honeywell at gmail.com
Sun Nov 11 23:26:09 CET 2012


I've got my app successfully bundled and built, but when I try to launch it
from Finder I get "snakewatch: Error" and nothing else except "exited with
error: 255" in Console.

When I run the binary from Terminal instead, I get

Traceback (most recent call last):
  File
"/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py",
line 7, in <module>
    _reset_sys_path()
  File
"/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py",
line 4, in _reset_sys_path
    resources = os.environ['RESOURCEPATH']
  File "UserDict.pyc", line 23, in __getitem__
KeyError: 'RESOURCEPATH'
2012-11-11 17:18:07.567 snakewatch[92013:707] snakewatch Error

If I run "RESOURCEPATH=$(pwd)/Resources MacOS/snakewatch" I get

Traceback (most recent call last):
  File
"/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py",
line 316, in <module>
    _run()
  File
"/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py",
line 304, in _run
    argv0 = os.path.basename(os.environ['ARGVZERO'])
  File "UserDict.pyc", line 23, in __getitem__
KeyError: 'ARGVZERO'

and if I run "RESOURCEPATH=$(pwd)/Resources ARGVZERO='' MacOS/snakewatch"
it launches fine.

Any reason why those variables wouldn't be set when I launch the app from
Finder?

Running py2app under a manually built Python 2.7.3 installation on Mountain
Lion, and the same errors happen regardless of the argv_emulation value.

Thanks,
 - Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20121111/975e634b/attachment-0001.html>


More information about the Pythonmac-SIG mailing list