Something has changed in r.773 with regards to unicode handling...  My forms
work perfectly as long as I don't have any unicode string in it but they abort
with an UnicodeEncodeDecode exception otherwise.

They were working with r.765. 

<downgrading to r.765 to confirm>

Nope...  Now they don't work anymore...  So this might be some other
component.

Here's the traceback:

================================================================================
Traceback (most recent call last):
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py",
 line 99, in _run
    self.main()
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py",
 line 247, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in default
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 198, in expose
    func, tg_format, html, fragment, *args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py", 
line 193, in run_with_transaction
    retval = func(*args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 215, in _execute_func
    output = errorhandling.try_call(func, self, *args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 62, in try_call
    output = func(self, *args, **kw)
  File 
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/unidades.py", 
line 29, in default
    return self.unidades(args[0])
  File "<string>", line 3, in unidades
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 193, in expose
    output = _execute_func(self, func, tg_format, html, fragment,
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 220, in _execute_func
    return _process_output(tg_format, output, html, fragment)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 68, in _process_output
    fragment=fragment)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/view.py", line 
60, in render
    return engine.render(info, format, fragment, template)
  File 
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
 line 136, in render
    return t.serialize(encoding=self.defaultencoding, output=format, 
fragment=fragment)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/__init__.py",
 line 236, in serialize
    return serializer.serialize(self, encoding, fragment)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/serialization.py",
 line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/serialization.py",
 line 327, in generate
    for ev, item in self.apply_filters(stream):
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/serialization.py",
 line 84, in balancing_filter
    for ev, item in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 206, in _coalesce
    for ev, item in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/filter.py",
 line 21, in transform_filter
    for ev, item in apply_matches(stream, template, templates, apply_func):
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/filter.py",
 line 31, in apply_matches
    item = stream.expand()
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 95, in expand
    for ev, item in self._iter:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 164, in _track
    for p in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 206, in _coalesce
    for ev, item in stream:
  File 
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/templates/form_generico.py",
 line 151, in _pull
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/filter.py",
 line 21, in transform_filter
    for ev, item in apply_matches(stream, template, templates, apply_func):
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/filter.py",
 line 25, in apply_matches
    for ev, item in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 164, in _track
    for p in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 206, in _coalesce
    for ev, item in stream:
  File "<string>", line 67, in _pull
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/filter.py",
 line 21, in transform_filter
    for ev, item in apply_matches(stream, template, templates, apply_func):
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/filter.py",
 line 25, in apply_matches
    for ev, item in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 164, in _track
    for p in stream:
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 206, in _coalesce
    for ev, item in stream:
  File "<string>", line 25, in _pull
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/template_util.py",
 line 60, in make_attrib
    ls = [to_unicode(i, encoding) for i in v if i is not None]
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/pull.py",
 line 190, in to_unicode
    return unicode(value, encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal 
not in range(128)
================================================================================

The unicode string is "quilĂ´metro" (kilometer).


Any hints?  All my forms are acting this way and it prevents me from using the
application. 

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to