title: Placing an image using ttk on a grid, with Python 2.7.11
body: <p>I am stuck when I try to place an image on my GUI. Based on the program I am working on, I am restricted to working with Python v2.7.11.  I have a basic GUI that I pulled from elsewhere (shown below, top code).  However, when I try to place an image using a similar process, my GUI goes away altogether (no other features show). Edit: The error I am receiving is "image "pyimage28" doesn't exist, even though I'm defining my image as 'bug.gif'. The full error message is shown in the second code snippet; both the code and the image are located in on the Desktop.</p>
  
  <p>Based on another question on this <a href="https://stackoverflow.com/questions/18175328/default-image-sizes-in-ttk-label">site</a>, my attempt is shown below, starting with the variable "label".</p>
  
  <p>Ultimately, I would like to do two things.</p>
  
  <ol>
  <li>Place an image in the upper left corner of the GUI in place of where the <code>frame</code> item was</li>
  <li>Give that image properties, such that I can store x,y coordinates when I click somewhere on the image, or the coordinates show in real time outside of the image.</li>
  </ol>
  
  <p>.</p>
  
  <pre><code>from Tkinter import *
  import ttk
  
  root = Tk()
  
  content = ttk.Frame(root)
  #frame = ttk.Frame(content, borderwidth=5, relief="sunken", width=200, height=100)
  
  label = ttk.Label(root)
  image1 = PhotoImage(file='bug.gif')
  label['image'] = image1
  
  latlbl = ttk.Label(content, text="Latitude")
  latval = ttk.Entry(content)
  lonlbl = ttk.Label(content, text="Longitude")
  lonval = ttk.Entry(content)
  
  onevar = BooleanVar()
  twovar = BooleanVar()
  threevar = BooleanVar()
  onevar.set(True)
  twovar.set(False)
  threevar.set(True)
  
  one = ttk.Checkbutton(content, text="One", variable=onevar, onvalue=True)
  two = ttk.Checkbutton(content, text="Two", variable=twovar, onvalue=True)
  three = ttk.Checkbutton(content, text="Three", variable=threevar, onvalue=True)
  ok = ttk.Button(content, text="Okay")
  cancel = ttk.Button(content, text="Cancel")
  
  content.grid(column=0, row=0)
  
  #frame.grid(column=0, row=0, columnspan=3, rowspan=2)
  
  label.grid(column=0, row=0, columnspan=3, rowspan=2)
  latlbl.grid(column=3, row=0, columnspan=1)
  latval.grid(column=4, row=0, columnspan=2)
  lonlbl.grid(column=3, row=1, columnspan=1)
  lonval.grid(column=4, row=1, columnspan=2)
  one.grid(column=0, row=3)
  two.grid(column=1, row=3)
  three.grid(column=2, row=3)
  ok.grid(column=3, row=3)
  cancel.grid(column=4, row=3)
  label.pack()
  
  root.mainloop()
  </code></pre>
  
  <p>The full code error is:</p>
  
  <pre><code>runfile('C:/Users/ajpung/Desktop/untitled9.py', wdir='C:/Users/ajpung/Desktop')
  Traceback (most recent call last):
  
    File "&lt;ipython-input-1-1596c9c787bc&gt;", line 1, in &lt;module&gt;
      runfile('C:/Users/ajpung/Desktop/untitled9.py', wdir='C:/Users/ajpung/Desktop')
  
    File "C:\Users\ajpung\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
  execfile(filename, namespace)
  
    File "C:\Users\ajpung\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
  exec(compile(scripttext, filename, 'exec'), glob, loc)
  
    File "C:/Users/ajpung/Desktop/untitled9.py", line 25, in &lt;module&gt;
  label['image'] = image1
  
    File "C:\Users\ajpung\AppData\Local\Continuum\Anaconda2\lib\lib-tk\Tkinter.py", line 1333, in __setitem__
  self.configure({key: value})
  
    File "C:\Users\ajpung\AppData\Local\Continuum\Anaconda2\lib\lib-tk\Tkinter.py", line 1326, in configure
  return self._configure('configure', cnf, kw)
  
    File "C:\Users\ajpung\AppData\Local\Continuum\Anaconda2\lib\lib-tk\Tkinter.py", line 1317, in _configure
  self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
  
  TclError: image "pyimage1" doesn't exist
  </code></pre>