title: What causes the error 'unknown option "pyimage1"' while I'm trying to load image onto canvas with tkinter?
body: <p>I've been trying to use tkinter for creating GUI with Python, today I decided to use images in my GUI, but while using Canvas from tkinter I ran into this error:</p>
  <pre><code>    Traceback (most recent call last):
        
  
     File &quot;C:\Users\37063\Desktop\pomodoro\main.py&quot;, line 25, in &lt;module&gt;
          canvas.create_image((100, 112), image_canvas)
     File &quot;C:\Users\37063\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py&quot;, line 2786, in create_image
          return self._create('image', args, kw)
     File &quot;C:\Users\37063\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py&quot;, line 2772, in _create
          return self.tk.getint(self.tk.call(
      _tkinter.TclError: unknown option &quot;pyimage1&quot; .
  </code></pre>
  <p>Here's my code:</p>
  <pre><code>from tkinter import *
  window = Tk()
  window.title(&quot;Gui test&quot;)
  canvas = Canvas(width=200, height=224)
  image_canvas = PhotoImage(file='ygo.gif')
  canvas.pack()
  canvas.create_image((100, 112), image_canvas)
  
  window.mainloop()
  </code></pre>
  <p>As I googled the error I saw that sometime it is solved by changing your image format, I tried .png, .jpeg, .gif and none of them seem to work for me. Thank you for your advise in advance :)</p>