Tkinter: image doesn't exist.

David Allen s2mdalle at titan.vcu.edu
Fri Mar 2 12:42:58 EST 2001


In article <A7In6.16280$Qb7.2658868 at newsb.telia.net>, "Fredrik Lundh"
<fredrik at pythonware.com> wrote:

> David Allen wrote:
>> What kind of a crappy error message is "image doesn't exist?"
> 
> it means exactly what it says: when created, the PhotoImage class registers
> a photoimage object with Tk, but when you try to use it in FooModule, it's
> no longer there.
> 
> are you perhaps using multiple root windows?

That is *exactly* what I'm doing.

> (each root has its own interpreter context, and images registered
> in one context aren't visible in other contexts.  use Toplevel in- stead).

D'oh!  Thank you very much for the feedback.  I kept
RTFM'ing, and I wasn't finding anything.  How you're
supposed to know these types of things without someone
telling you is beyond me.  :)

-- 
David Allen
http://opop.nols.com/
----------------------------------------
It is impossible to sharpen a pencil with a blunt axe.  It is equally
vain to try to do it with ten blunt axes instead.
                -- Edsger W. Dijkstra



More information about the Python-list mailing list