Sunday, February 28, 2010

exceptions.UnicodeDecodeError in __deepcopy__

I'm using get_or_create() through a relationship.

The 'parent' record contains unicode data, and it's already been
stored to the database.

When I go to create the 'child' record it goes like this:
get_or_create -> get -> order_by -> query.clone -> deepcopy

Deep in the deepcopy, Python (copy_reg.py) is trying to ASCII-ify one
of the strings and it's failing.

I read through the deepcopy code and it appears that it will handle
Unicode properly, but ASCII-ifies strings that are not specifically
Unicode.

I'm not sure where in which object something is a "plain" string so
I'm not sure what to pre-convert.

So, the question is, where to put the screw?

Has anyone seen and solved this?

Thanks in advance for any insight anyone might be able to lend.

Thanks,

S
aka/ssteinerX
aka/Steve Steiner


--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate