[GH-ISSUE #44] Get some error and cant build .exe #45

Closed
opened 2026-02-26 12:20:17 +03:00 by kerem · 2 comments
Owner

Originally created by @mfirouzin on GitHub (Jan 28, 2019).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/44

when I use .ico file i got this error but without icon file there is not any error!

50296 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
50310 INFO: Bootloader C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
50310 INFO: checking EXE
50311 INFO: Building EXE because EXE-00.toc is non existent
50311 INFO: Building EXE from EXE-00.toc
50313 INFO: SRCPATH [('C:\LCL\icon.ico', None)]
50314 INFO: Updating icons from ['C:\LCL\icon.ico'] to C:\Users\PowerMan\AppData\Local\Temp\tmp2lbyh0dp
An error occurred, traceback follows:
Traceback (most recent call last):
File "C:\Users\PowerMan\Desktop\auto-py-to-exe-master\auto_py_to_exe_main_.py", line 217, in convert
pyi.run() # Execute PyInstaller
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller_main_.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller_main_.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
exec(text, spec_namespace)
File "", line 32, in
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\api.py", line 433, in init
self.postinit()
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in postinit
self.assemble()
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\api.py", line 522, in assemble
icon.CopyIcons(tmpnm, self.icon)
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 177, in CopyIcons
return CopyIcons_FromIco(dstpath, [srcpath])
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 134, in CopyIcons_FromIco
for i, f in enumerate(icons):
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 104, in init
entry.fromfile(file)
File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 65, in fromfile
self.fields = list(struct.unpack(self.format, data))
struct.error: unpack requires a buffer of 16 bytes

Project output will not be moved to output folder
Complete.

Originally created by @mfirouzin on GitHub (Jan 28, 2019). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/44 when I use .ico file i got this error but without icon file there is not any error! 50296 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully. 50310 INFO: Bootloader C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe 50310 INFO: checking EXE 50311 INFO: Building EXE because EXE-00.toc is non existent 50311 INFO: Building EXE from EXE-00.toc 50313 INFO: SRCPATH [('C:\\LCL\\icon.ico', None)] 50314 INFO: Updating icons from ['C:\\LCL\\icon.ico'] to C:\Users\PowerMan\AppData\Local\Temp\tmp2lbyh0dp An error occurred, traceback follows: Traceback (most recent call last): File "C:\Users\PowerMan\Desktop\auto-py-to-exe-master\auto_py_to_exe\__main__.py", line 217, in convert pyi.run() # Execute PyInstaller File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build exec(text, spec_namespace) File "<string>", line 32, in <module> File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\api.py", line 433, in __init__ self.__postinit__() File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__ self.assemble() File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\building\api.py", line 522, in assemble icon.CopyIcons(tmpnm, self.icon) File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 177, in CopyIcons return CopyIcons_FromIco(dstpath, [srcpath]) File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 134, in CopyIcons_FromIco for i, f in enumerate(icons): File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 104, in __init__ entry.fromfile(file) File "C:\Users\PowerMan\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\utils\win32\icon.py", line 65, in fromfile self._fields_ = list(struct.unpack(self._format_, data)) struct.error: unpack requires a buffer of 16 bytes Project output will not be moved to output folder Complete.
kerem closed this issue 2026-02-26 12:20:17 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Jan 29, 2019):

Was the .ico file you provided a valid icon file? You can't just rename the file to be .ico and use it.

Have you tried with a different icon file?

<!-- gh-comment-id:458409501 --> @brentvollebregt commented on GitHub (Jan 29, 2019): Was the .ico file you provided a valid icon file? You can't just rename the file to be .ico and use it. Have you tried with a different icon file?
Author
Owner

@mfirouzin commented on GitHub (Jan 29, 2019):

Was the .ico file you provided a valid icon file? You can't just rename the file to be .ico and use it.

Have you tried with a different icon file?

yes i change the icon name from icon.ico to another name and that sounds good!

<!-- gh-comment-id:458589717 --> @mfirouzin commented on GitHub (Jan 29, 2019): > Was the .ico file you provided a valid icon file? You can't just rename the file to be .ico and use it. > > Have you tried with a different icon file? yes i change the icon name from icon.ico to another name and that sounds good!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#45
No description provided.