I am developing a site using webpy running on google app engine. When
I tried to display data returned by gae's db.Model I got the following
traceback:

Traceback (most recent call last):
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
application.py", line 242, in process
    return self.handle()
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
application.py", line 233, in handle
    return self._delegate(fn, self.fvars, args)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
application.py", line 415, in _delegate
    return handle_class(cls)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
application.py", line 390, in handle_class
    return tocall(*args)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/
code.py", line 116, in GET
    return render.view(event)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
template.py", line 1024, in template
    return self._base(t(*a, **kw))
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
template.py", line 898, in __call__
    return BaseTemplate.__call__(self, *a, **kw)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
template.py", line 804, in __call__
    return self.t(*a, **kw)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/
templates/__init__.py", line 13, in view
    extend_([u'<p>', escape_(event.description, True), u'</p>\n'])
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
template.py", line 821, in _escape
    value = safeunicode(value)
File "/base/data/home/apps/tschallengetour/1.347401471239577349/web/
utils.py", line 333, in safeunicode
    return str(obj).decode(encoding)
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-4: ordinal not in range(128)

Code failed to decode $event.description property but successfully
decode $event.title one. Both values of properties are in Russian
language.
While I run site locally everything is okay.

Does anyone know a clue on this?

-- template html
$def with (event)

<h1>$event.title</h1>
<p>$event.description</p>

-- model py
class Event(db.Model):
    title = db.StringProperty()
    description = db.TextProperty()

Thanks,
Sergei

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to