Pyinstaller fails with adding matlab.ctf file into binary

18 views
Skip to first unread message

Lang Yu

unread,
Aug 14, 2023, 10:09:52 AM8/14/23
to PyInstaller
Hi,

I am experiencing error in adding matlab.ctf file into binary in the spec file after 5.10.0.

The error happens in 

 self.__postinit__()


the error is 

  File "3.8.13/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/macholib/MachO.py", line 171, in load_header

    raise ValueError("Unknown Mach-O header: 0x%08x in %r" % (header, fh))

ValueError: Unknown Mach-O header: 0x504b0304 in <_io.BufferedReader


I think it is related with this change: https://github.com/pyinstaller/pyinstaller/pull/7522


Does anybody know how to solve this problem?


Best,

Lang

bwoodsend

unread,
Aug 16, 2023, 4:49:34 AM8/16/23
to PyInstaller

Binaries in PyInstaller is specific to .dylib or executable files. That matlab.ctf file isn’t either — it’s just a data file. Add it to datas instead.

Reply all
Reply to author
Forward
0 new messages