CustomTkinter: iconbitmap is not working when converted to .exe
In windows 11 with Python 3.11 iconbitmap is not working after converting the LinkApp.py to exe
File "LinkApp.py", line 267, in <module>
File "LinkApp.py", line 23, in __init__
File "customtkinter\windows\ctk_tk.py", line 230, in iconbitmap
super().wm_iconbitmap(bitmap, default)
File "tkinter\__init__.py", line 2136, in wm_iconbitmap
_tkinter.TclError: bitmap "empty.ico" not defined
Name: customtkinter
Version: 5.1.3
Summary: Create modern looking GUIs with Python
Home-page: https://customtkinter.tomschimansky.com
Author: Tom Schimansky
Author-email:
License: Creative Commons Zero v1.0 Universal
Location: C:\Users\shosabet\AppData\Local\Programs\Python\Python311\Lib\site-packages
Requires: darkdetect
Required-by: CTkMessagebox, tkintermapview
Not sure if this issue mentioned is really fixed on .exe file.
Gone through packaging page and followed the steps not worked. my ico file and py file are both in the same folder
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 21
Got sometime to go through whole conversation #939 and thanks everyone, specially @Akascape and @dishb its working with onefile window option as well with Python 3.11 version(windows), just need to call the function(I provided below sample) and include the folder where your resources are kept in additional files section. Don’t forget to add below command in settings “Manually Provide Options” –collect-all customtkinter --collect-all darkdetect --collect-all CTkMessagebox
Note: CTkMessagebox if you are using it
I think we are good to close this one.
Sure I will take a look, but so far I haven’t got success, as I am looking for the title bar icon change. It works to change the title bar icon but when converted to exe not able to find out the location. I created icons folder and tried to place in the same folder where my python script reside, still not worked. Let me try the options specified. The guide which @Akascape mentioned itself is so long and not able to figure out what is the summary out of it. Need to study more and try. I will look into your options as well. Thanks much. Hope this resolves the issue.