On Jun 27, 8:06 pm, Karen Tracey <[email protected]> wrote: > On Sun, Jun 27, 2010 at 1:54 PM, derek <[email protected]> wrote: > > File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/ > > options.py" in change_view > > 900. change_message = > > self.construct_change_message(request, form, formsets) > > File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/ > > options.py" in construct_change_message > > 566. 'object': > > force_unicode(added_object)}) > > File "/usr/local/lib/python2.6/dist-packages/django/utils/encoding.py" > > in force_unicode > > 66. s = unicode(s) > > > Exception Type: TypeError at /admin/auth/user/1/ > > Exception Value: coercing to Unicode: need string or buffer, NoneType > > found > > This traceback shows the admin attempting to create a change message for the > change history log. It's calling unicode() on the added object, but running > into trouble because the __unicode__ method for whatever object was added is > apparently returning None. Check the __unicode__ method for whatever type of > object you were adding here -- it appears to return None (at least in some > cases), which is not valid for a __unicode__ method. These methods must > return unicode or something that can be coerced to unicode (string or > buffer). > > Karen > --http://tracey.org/kmt/
It appears the error was on the def __unicode__(self) method for the UserProfile. Whatever I add there causes this error to be triggered; conversely, removing the method removes the problem. So that's the cause... I will try and figure out a solution. Thanks Derek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

