title: 'image "pyimage2" doesn't exist'?
body: <p>This is where the error is found:</p>
  
  <pre><code>global backbuttonimg
  backbuttonimg = PhotoImage(file="backbutton.gif")
  C6 = tkinter.Button(W_CheckDates, image=backbuttonimg, command = CheckDatesBack)
  C6.pack()
  </code></pre>
  
  <p>I don't understand why this isn't working. I have another image in my program here:</p>
  
  <pre><code>def Login():
    global W_Menu
    W_Menu = Tk()
    W_Menu.geometry('160x310+600+200')
    W_Menu.title("NSS DB")
    A0 = Canvas(W_Menu, width='160', height='160')
    A0.pack()
    global img
    img = PhotoImage(file="nsslogo.gif")
    A0.create_image(80,80, image=img)
  </code></pre>
  
  <p>I also get a similar error when I try to call the above definition after it has already been initially called (for example when my program logs out) so I have readjusted so the window simply deiconifies instead of calling it again, and I do not get the error again. However I am confused as to why I get an error with the former section of code now, as the button simply does not show up whether it is called for the first time or not. Sorry if this is a bit vague, please ask if I have not explained in enough detail. Thanks in advance.</p>
  
  <p>P.S. I have looked in other threads with similar problems but none apply to me.</p>