Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Error from JSON serializer
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
web-junkie  
View profile  
 More options Jul 5 2007, 8:13 am
From: web-junkie <web-jun...@gmx.net>
Date: Thu, 05 Jul 2007 05:13:16 -0700
Local: Thurs, Jul 5 2007 8:13 am
Subject: Error from JSON serializer
Hi,

after updating to the trunk with the merged Unicode branch I get
errors for my json pages. Everything is normal until I request
something where it would serialize data with foreign language letters
which comes as Unicode from the database.
And as far as I can tell I have done everything it says in
http://www.djangoproject.com/documentation/unicode/.

 File "/usr/local/lib/python2.4/site-packages/django/core/serializers/
__init__.py", line 67, in serialize
   s.serialize(queryset, **options)

 File "/usr/local/lib/python2.4/site-packages/django/core/serializers/
base.py", line 50, in serialize
   self.end_serialization()

 File "/usr/local/lib/python2.4/site-packages/django/core/serializers/
json.py", line 26, in end_serialization
   simplejson.dump(self.objects, self.stream, cls=DjangoJSONEncoder,
**self.options)

 File "/usr/local/lib/python2.4/site-packages/django/utils/simplejson/
__init__.py", line 139, in dump
   fp.write(chunk)

UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 2: ordinal not in range(128)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
web-junkie  
View profile  
 More options Jul 5 2007, 9:09 am
From: web-junkie <web-jun...@gmx.net>
Date: Thu, 05 Jul 2007 06:09:54 -0700
Local: Thurs, Jul 5 2007 9:09 am
Subject: Re: Error from JSON serializer
okay, seems this ensure_ascii=False is useless, without it there's no
error.

On 5 Jul., 14:13, web-junkie <web-jun...@gmx.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »