Typeerror Str Returned Non String

[Solved] Typeerror Str Returned Non String | Solidity - Code Explorer | yomemimo.com
Question : TypeError: __str__ returned non-string (type instance)

Answered by : outtaspace-z5i9uqqdl3es

from PIL import ImageTk as itk
background = "background.png"
'''
Dont write it this way:
photo = tk.PhotoImage(Image.open(background))
'''
# Correct way
photo = itk.PhotoImage(file = background) # Use Pillow to import .jpeg etc.

Source : https://stackoverflow.com/questions/27180497/typeerror-str-returned-non-string-type-instance | Last Update : Sun, 06 Jun 21

Answers related to typeerror str returned non string type instance

Code Explorer Popular Question For Solidity