title: Displaying Images Using Python Events
body: <p>I am creating a small program that should display an image overlayed the main window based on a button click event. However, whenever I test the code that should be doing this, I get this error: <code>AttributeError: 'int' object has no attribute '_create'</code></p>
  <p>Here is the appropriate code:</p>
  <pre><code>def display_image(event):
      fail_image = tk.PhotoImage(file=&quot;./RedXMark.png&quot;)
      Canvas.create_image(0, 0, image=fail_image, anchor=&quot;nw&quot;)
  
  # Later in the code:
  
  root.bind('&lt;t&gt;', display_image)
  </code></pre>
  <p>I have been trying to use Tkinter's labels to display the image and, while I wouldn't get an error, it wouldn't display the image. The image is in the same folder as the program and is saved with that exact name.</p>
  <p>Any advice would be welcome!</p>