I have enabled json output in dev.cfg. If I go to
localhost:8080/index?tg_format=json the output is as expected. I have
a simple form with a textfield widget in it at
localhost:8080/client_add_edit and it looks fine when viewed normally.
However, if I go to localhost:8080/client_add_edit?tg_format=json I get
the output below:
-----------
Page handler: <bound method Root.client_add_edit of
<fasttgta9a1.controllers.Root object at 0xb77ffb8c>>
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0betadev_r980-py2.4.egg/cherrypy/_cphttptools.py",
line 99, in _run
self.main()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0betadev_r980-py2.4.egg/cherrypy/_cphttptools.py",
line 248, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in client_add_edit
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/controllers.py",
line 210, in expose
tg_format, html, fragment, *args, **kw)
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/database.py",
line 193, in run_with_transaction
retval = func(*args, **kw)
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/controllers.py",
line 233, in _execute_func
return _process_output(tg_format, output, html, fragment)
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/controllers.py",
line 69, in _process_output
fragment=fragment)
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/view.py",
line 55, in render
return jsonify.encode(info)
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/jsonify.py",
line 75, in encode
return _instance.encode(obj)
File
"/usr/lib/python2.4/site-packages/simplejson-1.1-py2.4.egg/simplejson/encoder.py",
line 259, in encode
File
"/usr/lib/python2.4/site-packages/simplejson-1.1-py2.4.egg/simplejson/encoder.py",
line 212, in _iterencode
File
"/usr/lib/python2.4/site-packages/simplejson-1.1-py2.4.egg/simplejson/encoder.py",
line 185, in _iterencode_dict
File
"/usr/lib/python2.4/site-packages/simplejson-1.1-py2.4.egg/simplejson/encoder.py",
line 220, in _iterencode
File
"/usr/lib/python2.4/site-packages/simplejson-1.1-py2.4.egg/simplejson/encoder.py",
line 226, in _iterencode_default
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a1-py2.4.egg/turbogears/jsonify.py",
line 70, in default
return jsonify(obj)
File "<string>", line 5, in jsonify
File "_speedups.pyx", line 376, in
_speedups.BaseDispatcher.__getitem__
File "build/bdist.linux-i686/egg/dispatch/interfaces.py", line 15, in
__call__
NoApplicableMethods: ((TableForm(name='form', form_attrs={}),), {})
-----------
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---