Python py2exe and pyffi errors


#1

Hello all.

I am having some trouble with my newly generated exe. I have my setup file options here:

options = {
    "optimize": 2,
    "ascii": 1, # to make a smaller executable, don't include the encodings
    "compressed": 1, # compress the library archive
    "packages": ["encodings"],
    "dll_excludes":['w9xpopen.exe'],
    "includes":["pyffi"]
    }


setup(
    options = {"py2exe": options},
    data_files = ["bin/settings.ini"],
    zipfile = "lib\PhotoshopExporter.zip",
    windows = [test_qt]
    )

When I try to use the tool it gets to the function that is using pyffi dds reader where I import it:

from pyffi.formats.dds import DdsFormat

And throws the following error:

File “pyffi\formats\dds__init__.pyo”, line 101, in File “pyffi\object_models\xml__init__.pyo”, line 98, in init File “pyffi\object_models__init__.pyo”, line 128, in openfile IOError: ‘dds.xml’ not found in any of the directories [None,D:\projects\Tools\PhotoshopTools\Exporter\lib\PhotoshopExporter.zip\pyffi\formats\dds’]

I still get the error when I copy the entire pyffi library into the zip file that is generated by setup

It is a strange one because I can run my main function inside of PyCharm and the exporter works just fine inside of that but it does not seem to be wanting to generate any of the necessary files when I run py2exe

Does anyone have any advice about this issue?