Yes, it is the first name of a person with a European name, who it's got that "ó" character. My understanding that it is Unicode. The variable prints ok in the rest of the code to the screen and in Django templates, but this __unicode_(self) method fails.
On Monday, 8 May 2017 17:22:42 UTC+1, Tom Evans wrote: > > What data is "Jón"? > > Is it u'J\xf3n' or something else? (print repr(self.fname)) > > Cheers > > Tom > > On Mon, May 8, 2017 at 5:10 PM, rmschne <rms...@gmail.com <javascript:>> > wrote: > > I have a Django setup that has worked for a very long time. Yesterday I > > upgraded from Django 1.10 to 1.11.1 and am getting the error: > > > > raise DjangoUnicodeDecodeError(s, *e.args) > > django.utils.encoding.DjangoUnicodeDecodeErrorJón > > : 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in > > range(128). You passed in <Meetingattendee: [Bad Unicode data]> (<class > > 'soc_util.models.Meetingattendee'>) > > > > when in the code simply printing the "Meetingattendee" object with > > > > def __unicode__(self): > > print self.fname > > return self.fname > > > > The above is a simplified version. The error first cropped up on the > more > > complex version > > > > def __unicode__(self): > > s=u'%s: %s, %s %s, %-12s, %s %s, %s, INV:%s, PO:%s, ItemCode:%s' > % > > (self.id,self.meeting.date.strftime("%d-%b-%Y"),self.table,self.seat,\ > > self.attendeestatus.status,self.fname, self.lname, > > self.affiliation, \ > > self.invoiceno,self.ponumber,self.itemcode) > > return s > > > > where I eventually determined that the code was not working when working > the > > field self.fname. > > > > self.fname fails when it is "Jón". Works fin with "Jon", of course. > > > > I have not tried to revert back to Django 1.10, but i guess that's the > next > > step unless there is something in Django 1.11.1 that was changed that > > affects this. I can't find anything mentioned in the release notes. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to django-users...@googlegroups.com <javascript:>. > > To post to this group, send email to django...@googlegroups.com > <javascript:>. > > Visit this group at https://groups.google.com/group/django-users. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/django-users/4d37cc78-7fe9-41b6-bcba-eb788465e54f%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e450ce55-cafa-4cb3-adda-6decea1c87cf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.