__str__ returned non-string (type
django error in models.py
__str__ returned non-string (type
--------------------------------
def __str__(self):
return self.username
__str__ returned non-string (type
django error in models.py
__str__ returned non-string (type
--------------------------------
def __str__(self):
return self.username
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.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us