Hi. Long-time reader etc etc

I've been tracking down an issue I've been having with deserializing
QuerySet objects from memcached, using the django.core.serializers
functionality.

After trying everything I could think of, I've narrowed down the
problem to the fact that memcached is returning unicode strings to me
- using serializers.deserialize on this returns a generator object
that raises this error when you try to iterate through it:

ValueError: Expecting object: line 1 column 1 (char 1)


I'm using django 0.97-pre (latest from svn) and python 2.4.
Interestingly, this problem *isn't* happening on my dev machine,
running python 2.5 (but the same version of django).

To reproduce:


from django.core import serializers
s = serializers.serialize('json', DjangoModel.objects.all(),
ensure_ascii=False)
u_s = unicode(s)

obj_l = serializers.deserialize('json', s)
# This works
for obj in obj_l:
    print obj

obj_l = serializers.deserialize('json', u_s)
# This fails
for obj in obj_l:
    print obj


Is this a known issue? Does anyone have any insight as to why this
might be happening?

Thanks
Ben

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to