I run into an interesting error trying to submit a form:
Traceback (most recent call last):
File
"c:\python24\lib\site-packages\cherrypy-2.2.0-py2.4.egg\cherrypy\_cphttptools.py",
line 104, in _run
applyFilters('before_main')
File
"c:\python24\lib\site-packages\cherrypy-2.2.0-py2.4.egg\cherrypy\filters\__init__.py",
line 151, in applyFilters
method()
File
"C:\Python24\lib\site-packages\cherrypy-2.2.0-py2.4.egg\cherrypy\filters\decodingfilter.py",
line 31, in before_main
self.decode(enc)
File
"C:\Python24\lib\site-packages\cherrypy-2.2.0-py2.4.egg\cherrypy\filters\decodingfilter.py",
line 51, in decode
decodedParams[key] = value.decode(enc)
AttributeError: 'dict' object has no attribute 'decode'
Adding print stmt showed that it tries to decode a dict for 'defaults' form
field, form is defined like this:
spacoll_import_form = widgets.TableForm('import', submit_text='Import',
fields=[
...
widgets.FieldSet('defaults', template='spaca.templates.table_fieldset',
label='Default values',
fields=spacoll_default_fields()),
]
)
While this is CherryPy bug and should be reported/fixed maybe TG should provide
its own decoding filter? Also, CherryPy folks may prefer not to fix it, as
having dict as a value is clearly TG-specific artifact.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---