struct.error: unpack requires a bytes object of length 16 (same as issue #2051)
First of all, thank you for making such an awesome tool! I have used pyinstaller to package my app in one file and it works perfectly. However....
I tried to add an icon to my exe through the spec file and it failed to do so. The exact err msg says:
struct.error: unpack requires a bytes object of length 16
This is the same exact as issue #2051, which was closed without any answers!
Here's how my EXE object looks like in the spec file:
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='stuff',
debug=False,
strip=False,
upx=True,
console=True,
icon="somefile.ico")
I have downloaded an icon from google and saved it as somefile.ico in Windows64 Any help is appreciated. Thank you!
The icon is not a valid ico file. If you want a valid ico file, you can download one here.
Yeah google images does not work as icons for some reason!
Please close the issue if it is solved.
@yagman: Of course icons for windows need to be the correct file/image format. When you "downloaded an icon from google and saved it as somefile.ico": Was this an .ico file? Did you convert it into an .ico file? Or did you just change the name?
I downloaded a png file from google and changed its extension (name) to *.ico using the command line. That does not work for some reason so you'd have to convert your png into proper dumb windows ico format!