pyinstaller打包带图标时报错问题

现象是通过pyinstaller -F --icon=Logo.ico dddd.py 打包成exe,不加--icon参数时能打包成功,加入后报错“struct.error: unpack requires a string argument of length 16",百度后得到答案是图标文件的尺寸问题,原先的尺寸为16x16的,改成128x128的后,打包成功。

原文地址:https://www.cnblogs.com/musiq66/p/11046166.html