[PythonReports-users] PythonReports and py2exe
Brought to you by:
a1s
From: Werner F. B. <wer...@fr...> - 2013-01-03 18:58:40
|
Hi, I am at the stage where I like to test my distribution method with PythonReports. I use py2exe and InnoSetup to generate an installer. Updated my setup.py to ensure that PythonReports and reportlab get included by py2exe by adding them to "packages" option. However the way images are handled in PythonReports I run into this error: 19:39:52: can't open file 'C:\Program Files\TheWineCellarBookV4\lib\library.zip\PythonReports\editor\res\pythonreports.ico' (error 3: le chemin d'accès spécifié est introuvable.) 19:39:52: No handler found for image type. The French text means "access path is not found", however if I check the library.zip file it does contain the image, but I think "AddIconFromFile" can't deal with this path (and/or extracting from a zip archive). To get the images into the library.zip I had to do a hack in the setup.py to manually update the library.zip. The nicest way, in my view, would be to have the images in a resource file created by imp2py (wxPython tools). That approach should then be fine regards less of py2exe options/configuration (and should also work for other freezing tools, cxfrezze etc). I would be happy to do a patch for that change if this would be o.k. with you. Best regards Werner |