Собираю с помощью py2exe исполняемый файл.
Но после сборки когда запускаю exe возникает ошибка:
Traceback (most recent call last):
File “Imitator_GSM_Pager_Display.py”, line 1340, in <module>
File “Imitator_GSM_Pager_Display.py”, line 111, in __init__
File “wx\lib\agw\shapedbutton.pyo”, line 234, in __init__
File “PIL\Image.pyo”, line 1888, in open
IOError: No such file or directory: ‘C:\\py_projects\\Imitator_GSM_pager_display\\dist\\Imitator_GSM_Pager_Display.exe\\wx\\lib\\agw\\UpButton.png’
Использую модуль wxShapedButton для отображения круглой кнопки, в этом модуле есть две картинки с расширениями *.png, такое чувство что при сборке py2exe не поместил эти картинки в exe…
Как побороть проблему?
p.s. вид setup.py:
from distutils.core import setup
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append(“py2exe”)
# creates a standalone .exe file, no zip files
setup( options = {“py2exe”: {“compressed”: 1, “optimize”: 2,“ascii”: 1, “bundle_files”: 1}},
zipfile = None,
# replace myFile.py with your own code filename here …
windows = )