I have a simple GUI program I'm building with Tkinter. I want to have a bunch of buttons with app images on them that, when clicked, launch that app. The problem is, Python can't recognise the Skype.gif
file.
Code:
from tkinter import *
import os
def open_skype():
os.system('open /Applications/Skype.app')
master = Tk()
photo = PhotoImage(file='/Users/michael/Desktop/Skype.gif')
but = Button(master, image=photo, command=open_skype)
objs = [but]
column = 1
for i in objs:
i.grid(column=column, row=1)
column += 1
mainloop()
Error message:
_tkinter.TclError: couldn't recognize data in image file "/Users/michael/Desktop/Skype.gif"