Найти - Пользователи
Полная версия: Py2exe проблемы после сборки exe
Начало » GUI » Py2exe проблемы после сборки exe
1
Vad
Собираю с помощью 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 = )
Vad
Проблема решена.
Chrizt
Автор, поделись решением?
Vad
Решил проблему сборки exe след. образом:

Нашел вариант модуля lib.agw в котором картинки с изображением кнопок Button.png
преобразовано в строки и включены в сам модуль а не подгружаются.
В таком варианте py2exe смог засунуть их в exe, картинки же *.png он почему то не хотел включать в exe.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB