1👍
✅
If you are using @python_2_unicode_compatible
, then your __str__
method should return a unicode string.
You havee str(self.region+", "+self.country)
, which tries to convert the unicode string to a byte string in Python 2. To fix the problem, change the method to:
def __str__(self):
return self.region + u"," + self.country
Source:stackexchange.com