title: Why photoimages don't exist?
body: <p>I will show a reduced portion of the code that gives me a problem.</p>
  
  <p><code>_tkinter.TclError: image "pyimageN" doesn't exist</code> - where N stays for 1, 2, 3, etc...</p>
  
  <p>There is a first class that shows a menu using an image in the background.</p>
  
  <pre><code>class MenuWindow():    #in this class we show the main part of the program
      def __init__(self):
          self.Menu=Tk()
          self.MCanvas=Canvas(self.Menu)
          self.MCanvas.bind("&lt;ButtonPress-1&gt;",self.MenuClick)
  
          #unuseful lines that configure the window and the canvas#
  
          self.Background=PhotoImage(height=600,width=700)#a simple tkinter.PhotoImage object
  
          #other unuseful lines that draw the photoimage ( without reading any file, with the method put())#
  
          self.MCanvas.create_image((x,y),image=self.Background,state="normal")
  
          #unuseful lines that continue the drawing of the canvas#
  </code></pre>
  
  <p>And a second class that shows another window, using another image in the background. This class is launched by the first class via click binding of the function self.MenuClick.</p>
  
  <pre><code>class EditorWindow():    #in this class we show the main part of the program
      def __init__(self):
          self.Eenu=Tk()
          self.ECanvas=Canvas(self.Eenu)
  
          #unuseful lines that configure the window and the canvas#
  
          self.Background=PhotoImage(height=600,width=700)
  
          #other unuseful lines that draw the photoimage ( without reading any file , with the method put() )#
  
          self.ECanvas.create_image((x,y),image=self.Background,state="normal")#in this line i get the error
  
          #unuseful lines that continue the drawing of the canvas#
  </code></pre>
  
  <p>The complere traceback is the following:</p>
  
  <pre class="lang-none prettyprint-override"><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 1399, in __call__
      return self.func(*args)
    File "/Users/albertoperrella/Desktop/slay.py", line 70, in MenuClick
      EditorWindow(self)
    File "/Users/albertoperrella/Desktop/slay.py", line 85, in __init__
      self.ECanvas.create_image((3,3),image=self.Background,state="normal",anchor="nw")
    File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 2140, in create_image
      return self._create('image', args, kw)
    File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 2131, in _create
      *(args + self._options(cnf, kw))))
  _tkinter.TclError: image "pyimage2" doesn't exist
  </code></pre>
  
  <p>The two classes are made in a similar way, so I don't know why I get the error with the second one. I am sure that it isn't a writing error e.g.(conttruct instead of construct) and that the images I am using actually exist.</p>
  
  <p>So I think that:</p>
  
  <ul>
  <li><p>I am making some concept mistakes,</p></li>
  <li><p>or it is a bug (or subtle behaviour of Tkinter) in python.</p></li>
  </ul>