[Tkinter-discuss] problem loading images
leon
billtorvalds1 at yahoo.it
Mon May 31 07:27:46 EDT 2004
On a debian unstable with python2.3 and python2.3-imaging-tk 1.1.4-3,
python2.3-tk 2.3.4-1 I get this behaviour...
>>> from Tkinter import *
>>> from PIL import Image, ImageTk
>>> img = Image.open('image.gif')
>>> root = Tk()
>>> button2 = Button(root, image=img)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1906, in __init__
Widget.__init__(self, master, 'button', cnf, kw)
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1835, in __init__
self.tk.call(
_tkinter.TclError: image "<PIL.JpegImagePlugin.JpegImageFile instance at
0x40f2998c>" doesn't exist
>>> img
<PIL.JpegImagePlugin.JpegImageFile instance at 0x40f2998c>
it seems there is an istance, but it can't be seen by tk.call(). ??
quite confused about this.
any ideas?
leon.
--
www.lilik.it/users/leonardo
0C5F B8DE 3136 1506 96D0 1806 7674 D513 A66E 7854
More information about the Tkinter-discuss
mailing list