"Kevin Dangoor" <[EMAIL PROTECTED]> writes:
> OK, I've taken a look at this and it seems pretty similar to what I'm
> testing for. I just committed a test that i have that's passing. Can
> you take a look at that test and see if something about it strikes you
> as distinctly different from what's going on in your program? It's the
> last test in:
>
> turbogears/widgets/tests/test_forms.py
>
> That test is verifying that something coming from the web that turns
> into a dictionary is turning into a dictionary *after* the decode
> filter does its thing.
Hmmmm... It looks like it is similar to what I have. I ran nosetests and it
worked for me as well.
Is it any different from a browser submitting the data?
url = u"/checkform?foo.name=Kevin&foo.age=some%20NĂºmero".encode("utf-8")
And I see a difference in my controller. I have:
kword['faixa']['superior']
and you used:
newroot.foo["name"]
Maybe I should use kword.faixa['superior'].
I'll give it a try...
Still the same problem... (All latest SVN, including SQLObject)
================================================================================
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0rc1-py2.4.egg/cherrypy/_cphttptools.py",
line 99, in _run
self.main()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0rc1-py2.4.egg/cherrypy/_cphttptools.py",
line 248, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in save
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 207, in expose
output = database.run_with_transaction(expose._expose,func, accept,
allow_json, allow_json_from_config,*args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py",
line 216, in run_with_transaction
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 228, in <lambda>
expose._expose.when(rule)(lambda _func, accept, allow_json,
allow_json_from_config,*args,**kw: _execute_func(
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 246, in _execute_func
output = errorhandling.try_call(func, *args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
line 59, in try_call
output = func(self, *args, **kw)
File "<string>", line 3, in save
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 143, in validate
return errorhandling.run_with_errors(errors, func, *args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
line 96, in run_with_errors
output = func(self, *args, **kw)
File "<string>", line 3, in save
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/identity/conditions.py",
line 233, in require
return fn(self, *args, **kwargs)
File "<string>", line 3, in save
File
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/decorador.py",
line 34, in mensagem_json
funcao(*args, **kwords)
File
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/controllers/analises.py",
line 210, in save
alteradoEm = agora,
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/declarative.py",
line 92, in _wrapper
return_value = fn(self, *args, **kwargs)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/main.py",
line 1197, in __init__
self._create(id, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/main.py",
line 1221, in _create
self.set(**kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/main.py",
line 1080, in set
kw[name] = dbValue = from_python(value, self._SO_validatorState)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/col.py",
line 547, in from_python
return value.encode(self.db_encoding)
AttributeError: 'dict' object has no attribute 'encode'
================================================================================
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---