Reputation: 179
I have a code that creates GUI using Tkinter but when I try to run PyInstaller and I create an exe file my .png image is missing from the app:
self.logo = PhotoImage(file = 'img01.png')
ttk.Label(self.frame_header, image = self.logo, ).grid(row = 0, column = 0,
rowspan = 2)
ttk.Label(self.frame_header, text = 'Static Data App!',style =
'Header.TLabel').grid(row = 0, column = 1)
ttk.Label(self.frame_header, wraplength = 400,
text = ("Just click on the buttons one by one and follow the
logic")).grid(row = 1, column = 1)
ttk.Label(self.frame_header, image = self.logo, ).grid(row = 0, column = 3,
rowspan = 2)
self.frame_content = ttk.Frame(master)
self.frame_content.pack()
The output I receive when I try to run exe file is "img.png no such file od directory" even though the img gets displayed when I run my app from the script.
Upvotes: 1
Views: 776
Reputation: 22
Are you copying the images folder to the dist folder where the .exe is?
Upvotes: 1