I created a .exe starting from a .py file with the following command:
pyinstaller --noconfirm --onedir --windowed --icon "C:/icon05.ico" --add-data "C:/icon05.ico;." --hidden-import "tkinter" "C:/script01.py"
The .exe enclosed in the generated folder works in one PC but not the other one.
Running the .exe in the other PC I get the following message:
Unhandled exception in script
Failed to execute script 'script01' due to unhandled exception: bitmap "icon05.ico" not defined
Traceback (most recent call last):
File "script01.py", line 387, in <module>
File "tkinter__init__.py", line 2080, in wm_iconbitmap
_tkinter.TclError: bitmap "icon05.ico" not defined
Tried several times but without success
New contributor
Andrea Meddis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.