Hi! I'm web2py and python newbie. I like web2py! But recently I have a
problem on GAE.
I encounterd UnicodeEncodeError on GAE when I update a field value of
one table on appadmin.
The table has a list:string field.
I suspect that cause is list:string field.
File "gluon\html.py", line 1585, in _postprocessing
_value = str(self['_value'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-2: ordinal not in range(128)
web2py version is 1.99.4
I found similar case. But it seems not to match with my problem.
http://groups.google.com/group/web2py/browse_thread/thread/a14bb4b530e3767e
I confirmed type(self['_value']).
in case of string, it is 'str'.
in case of list:stirng, it is 'unicode'.
I tried below but don't go good.
(dev_appserver OK. GAE NG)
----
if isinstance(self['_value'],unicode):
_value = self['_value'].encode('utf-8')
else:
_value = str(self['_value'])
----
I don't know how to fix this...
(I can't see detail of error of ticket on GAE Data viewer...
only like this
dp0 S'output' p1 S"<type 'exceptions.UnicodeEncodeError'> 'ascii'
codec can't encode characters in position 0-2: ordinal not in
range(128)" p2 sS'layer' p3
)
Could Anyone help me?