title: When using Tkinter, error: TclError: image "pyimage8" doesn't exist
body: <p>I keep getting the error, <code>TclError: image &quot;pyimage8&quot; doesn't exist</code>.
  It is strange, as the number increases every time I run it?</p>
  <p>I'm running python using spyder, dunno whether this affects anything.</p>
  <p>Here is my code:</p>
  <pre><code>#import tkinter
  import Tkinter as tk
    
  homescreenImage = PhotoImage(file=&quot;Homescreen.gif&quot;) 
  
  #create a GUI window.
  root = Tk()
  #set the title.
  root.title(&quot;Welcome to the Pit!&quot;)
  #set the size.
  root.geometry(&quot;1100x700&quot;)
  
  homescreenFrame = tk.Frame(root, width=1100, height = 700)
  homescreenFrame.pack()
  
  homescreenLabel = tk.Label(homescreenFrame, image=homescreenImage)
  homescreenLabel.pack()
  
  
  #start the GUI
  root.mainloop()
  </code></pre>