Tkinter: image doesn't exist.

David Allen s2mdalle at titan.vcu.edu
Thu Mar 1 18:53:33 EST 2001


When I run this line of code:

self.symbol = self.widget.create_image(x, y, image=fooimage)

I get this error:

  File "./FooModule.py", line 87, in __init__
    self.symbol = self.widget.create_image(x, y, image=fooimg)
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 1223, in create_image
    return self._create('image', args, kw)
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 1216, in _create
    (self._w, 'create', itemType)
TclError: image "137289752" doesn't exist

I've talked to several people and they though this
might be because the image is getting garbage 
collected, but I've verified that GC is *not* the
issue. I replaced fooimg with an actual PhotoImage
constructor (fooimg is a PhotoImage) with valid
data, and it still does the exact same thing.

What kind of a crappy error message is "image doesn't
exist?"  How would I fix it?

Any help would be greatly appreciated.
--
David Allen
http://opop.nols.com/
----------------------------------------
Der Horizont vieler Menschen ist ein Kreis mit Radius Null -- und das 
nennen sie ihren Standpunkt.



More information about the Python-list mailing list