A
A
Anatoly Belousov2021-11-15 00:30:46
Python
Anatoly Belousov, 2021-11-15 00:30:46

TKinter doesn't see the icon. What to do?

Good day! I am compiling a TKinter program into an EXE file. In code I use:

icon = tk.PhotoImage(file='icon.png') 
win.iconphoto(False, icon)

I merge EXE with a PNG image, but when I run it, it gives an error that it does not see the image. If you do not glue EXE and PNG, then it works, but it doesn’t suit me that way. What to do prompt?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Black back, 2021-11-15
@bekss

I think you need to use the Pillow library

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question