I am making a label containing a gif image.Image is not displayed and program gives the following error :
My Code for image label is:
Code:
Exception in Tkinter callback Traceback (most recent call last): File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__ return self.func(*args) File "D:\7th sem\abiabi\pythoproj2\toplevelchanges.py", line 114, in about label = Label(imageff,image=photo) File "C:\Python26\lib\lib-tk\Tkinter.py", line 2464, in __init__ Widget.__init__(self, master, 'label', cnf, kw) File "C:\Python26\lib\lib-tk\Tkinter.py", line 1930, in __init__ (widgetName, self._w) + extra + self._options(cnf)) TclError: image "pyimage3" doesn't exist
Code:
imageff=Frame(root1) photo = PhotoImage(file="toolbar-search.gif") label = Label(imageff,image=photo) imageff["pady"]=10 label.pack() imageff.pack() ......#other code of program root1.pack()#at the end
Comment