Tkinter application with Splash screen + One Directory mode breaks Tk.iconphoto() in packaged app.
Author: justinschoemanCreated Mar 6, 2026Updated Apr 5, 2026
Labelsarea:documentation
Description of the issue
When all of the following apply:
- Windows
- One Directory mode
- Splash screen
Then the packaged application ignores calls to Tk.iconphoto() and displays a feather icon.
Remove the splash screen, or build in One File mode, and Tk.iconphoto() works as expected.
Context information (for bug reports)
Output of
pyinstaller --version:6.19.0Version of Python: 3.13.12
Platform: Windows
How you installed Python: Windows store
Did you also try this on another platform? Yes, unknown.
try the latest development version, using the following command:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip- follow all the instructions in our "If Things Go Wrong" Guide (https://github.com/pyinstaller/pyinstaller/wiki/If-Things-Go-Wrong) and
Make sure everything is packaged correctly
- start with clean installation
- use the latest development version
- Run your frozen program from a command window (shell) — instead of double-clicking on it
- Package your program in --onedir mode
- Package without UPX, say: use the option
--noupxor setupx=Falsein your .spec-file - Repackage you application in verbose/debug mode. For this, pass the option
--debugtopyi-makespecorpyinstalleror useEXE(..., debug=1, ...)in your .spec file.
A minimal example program which shows the error
import tkinter as tk
def main():
root = tk.Tk()
root.title("Icon Test")
root.geometry("300x200")
gif_data = """R0lGODlhEAAQAKUAAGRiZLS2tIyKjOTi5HR2dJyenMzKzPT29GxubJSWlISChNTW1Ozq7KyurGxq
bMTCxJSSlHx+fKSmpNTS1Pz+/GRmZIyOjOTm5Hx6fKSipMzOzPz6/HRydJyanISGhNza3Ozu7MTG
xP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACIALAAAAAAQABAAAAZ4QJFw
KNociEikxpBsigoJJ3LDIRylQg2Co8EKCw5OJhlSRBQKD2dLgEAS8K4WAKg4HGwCRrEYggQVdggI
egQdIEgUDXgEHFUBFE0LeGwYE04Sd2FVDU0UHBUcDyEYHAqRSB8AChdCDBYYH0kSEhtEGwGdSANO
rUJBADs="""
# Create a PhotoImage object from the embedded data.
icon_image = tk.PhotoImage(data=gif_data)
# Set the window icon using iconphoto.
root.iconphoto(True, icon_image)
root.mainloop()
if __name__ == "__main__":
main()Stacktrace / full error message
N/A
Please also see https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs for more about what would use to solve the issue.
Source: pyinstaller/pyinstaller