title: Python - Dice Roller using Tkinter
body: <p>I am using the application Canopy on a windows computer system. I am attempting to create a fun and simple dice rolling game. The game works, however I am not able to successfully add an image of a dice as the button for rolling. I seem to get an error I can't really find any resources on. I am only wondering If I am implementing things into the wrong place? Or if the image code will not even work whatsoever. I don't want people to do this for me, I just need a simple answer to if I'm completing this correctly and I only need to maybe touch some things up.
  Thank you!</p>
  
  <p><em>Error provided from compilation:</em> <strong>TclError: image "pyimage26" doesn't exist</strong></p>
  
  <p><strong>Current standing code below...</strong></p>
  
  <pre><code> import random
      import Tkinter
      from PIL import ImageTk, Image
      import os
  
      win = Tkinter.Tk()
      win.title("Die Roller")
      class die():
          import Tkinter
          def __init__(self,ivalue,parent):
              self.label_var = Tkinter.IntVar()
              self.label_var.set(ivalue)
              self.display = Tkinter.Label(parent,relief='ridge', borderwidth=4, 
                             textvariable=self.label_var)
              self.display.pack(side='left')
  
      img = ImageTk.PhotoImage(Image.open("meme.jpg"))
      panel =Tkinter.Label(win, image =  img)
      panel.pack(side = "bottom", fill = "both", expand = "yes")
      win.mainloop()
      def roll(self):
              value = random.randint(1,6)
              self.label_var.set(value)
              print "You rolled =  ", value
      def rollin():
          d1.roll()
          d2.roll()
          d3.roll()
      row1 = Tkinter.Frame(win)
      row2 = Tkinter.Frame(win)
      d1 = die(1,row1)
      d2 = die(1,row1)
      d3 = die(1,row1)
      row1.pack()
      rolldice = Tkinter.Button(row2, command=rollin, text = "Roll The Die")
      rolldice.pack()
      row2.pack()
      win.mainloop()
  </code></pre>