Analitycs

суббота, 15 октября 2011 г.

Python py2app: AttributeError: 'module' object has no attribute 'TickCount'

Симптомы

После запуска собранного с помощью py2app пакета для MacOS на другой машине получаем падение с ошибкой

AttributeError: 'module' object has no attribute 'TickCount'

Лечение

В файле setup.py отключить argv_emulation, то есть - поставить в False

APP = ['MyApp.py']
OPTIONS = { 
   'argv_emulation': False,
   ...
}

setup(
    app=APP,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)


Подробности тут

2 комментария:

  1. I had this issue too, and whilst I was able to get around it by doing what you have suggested above, it caused my application to experience other problems because of the need to have argv_emulation set to True.

    In the end, I discovered that the implementation of Carbon.Evt is 32-bit, and so have solved the problem by including LSArchitecturePriority='i386' in my plist file. This solved the problem for me.

    ОтветитьУдалить
    Ответы
    1. Hello!
      Did you test you app in both 64/32 bit OSes?

      I need mine only for 64bit and you variant was not acceptible

      Удалить