Hi!
I just came across this problem.
Suppose I have this (minimal) controller:
class Root(controllers.RootController):
@expose()
def test(self, *args, **kwargs):
return "bla"
@expose()
@identity.require(identity.not_anonymous())
def test2(self, *args, **kwargs):
return "bla2"
When I call `/test?a=ä`, all works as expected. But when I call the
second handler `/test2?a=ä`, I get an error:
500 Internal error
The server encountered an unexpected condition which prevented it from
fulfilling the request.
Page handler: 'ordinal not in range(128)'
Traceback (most recent call last):
File "c:\programme\python25\lib\site-packages\cherrypy-2.2.1-
py2.5.egg\cherrypy\_cphttptools.py", line 103, in _run
applyFilters('before_main')
File "c:\programme\python25\lib\site-packages\cherrypy-2.2.1-
py2.5.egg\cherrypy\filters\__init__.py", line 151, in applyFilters
method()
File "c:\programme\python25\lib\site-packages\cherrypy-2.2.1-
py2.5.egg\cherrypy\filters\decodingfilter.py", line 31, in before_main
self.decode(enc)
File "c:\programme\python25\lib\site-packages\cherrypy-2.2.1-
py2.5.egg\cherrypy\filters\decodingfilter.py", line 50, in decode
decodedParams[key] = value.decode(enc)
File "c:\programme\python25\lib\encodings\utf_8.py", line 16, in
decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in
position 0: ordinal not in range(128)
I guess that this is not supposed to throw this error, is it?
I'm using TG 1.0.4b2.
Thanks for any advice!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---