The unicode stuff continues to give me no end of headaches. This
morning I keep getting the error below. As near as I can tell, when I
call AddManipulator it's getting the related fields, and there's a bad
character somewhere in there. My question is, how can I find it?

"UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in
position 21: ordinal not in range(128)" isn't very helpful... I don't
even know which DB record it's in.

Traceback (most recent call last):

 File "/home/baxter/lib/python2.5/django/core/handlers/base.py", line
82, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/home2/baxter/webapps/django/gretschpages/myghtyboard/
views.py", line 253, in add_post
   manipulator = Post.AddManipulator()

 File "/home/baxter/lib/python2.5/django/db/models/manipulators.py",
line 70, in __init__
   self.fields.extend(f.get_manipulator_fields(self.opts, self,
self.change))

 File "/home/baxter/lib/python2.5/django/db/models/fields/
__init__.py", line 309, in get_manipulator_fields
   field_objs, params =
self.prepare_field_objs_and_params(manipulator, name_prefix)

 File "/home/baxter/lib/python2.5/django/db/models/fields/related.py",
line 650, in prepare_field_objs_and_params
   params['choices'] = self.get_choices_default()

 File "/home/baxter/lib/python2.5/django/db/models/fields/
__init__.py", line 385, in get_choices_default
   return self.get_choices()

 File "/home/baxter/lib/python2.5/django/db/models/fields/
__init__.py", line 376, in get_choices
   lst = [(getattr(x, self.rel.get_related_field().attname),
smart_unicode(x)) for x in
rel_model._default_manager.complex_filter(self.rel.limit_choices_to)]

 File "/home/baxter/lib/python2.5/django/utils/encoding.py", line 37,
in smart_unicode
   return force_unicode(s, encoding, strings_only, errors)

 File "/home/baxter/lib/python2.5/django/utils/encoding.py", line 53,
in force_unicode
   s = unicode(str(s), encoding, errors)

UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in
position 21: ordinal not in range(128)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to