TypeError: __str__ returned non-string (type instance) code example
Example: TypeError: __str__ returned non-string (type instance)
from PIL import ImageTk as itk
background = "background.png"
'''
Don't write it this way:
photo = tk.PhotoImage(Image.open(background))
'''
# Correct way
photo = itk.PhotoImage(file = background) # Use Pillow to import .jpeg etc.