title: TypeError: __str__ returned non-string (type instance)
body: <p>I keep getting this really strange error that I cannot solve looking at any other post. I'm applying a background image to a tkinter canvas.</p>
  
  <pre><code>import Tkinter as tk     ## Python 2.X
  import Image
  
  root = tk.Tk(); 
  background = "background.png"
  
  photo = tk.PhotoImage(Image.open(background))
  canvas = tk.Canvas(root, width=500, height=500)
  canvas.pack()
  canvas.create_image(0, 0, anchor="nw", image=photo)
  
  root.mainloop()
  </code></pre>
  
  <p>But because of the last line, I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "main.py", line 40, in &lt;module&gt;
      canvas.create_image(0, 0, anchor="nw", image=photo)
    File "c:\Python27\lib\lib-tk\Tkinter.py", line 2279, in create_image
      return self._create('image', args, kw)
    File "c:\Python27\lib\lib-tk\Tkinter.py", line 2270, in _create
      *(args + self._options(cnf, kw))))
  TypeError: __str__ returned non-string (type instance)
  </code></pre>