str returned non string 28type

Solutions on MaxInterview for str returned non string 28type by the best coders in the world

showing results for - " str returned non string 28type"
Walid
16 Aug 2018
1django error in models.py
2__str__ returned non-string (type
3--------------------------------
4def __str__(self):
5    return self.username
Christian
20 Jun 2019
1from PIL import ImageTk as itk
2background = "background.png"
3'''
4Don't write it this way:
5photo = tk.PhotoImage(Image.open(background))
6'''
7# Correct way
8photo = itk.PhotoImage(file = background) # Use Pillow to import .jpeg etc.
9