#2055: jsonify doesn't undestands sqlalchemy.engine.base.RowProxy
--------------------------+-------------------------------------------------
Reporter: jorge.vargas | Owner: chrisz
Type: defect | Status: new
Priority: normal | Milestone: 2.0
Component: TurboJson | Version: 1.9.x
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
I'm writing a jsonrpc method using SQLAlchemy's sql layer and jsonify
fails.
Using this sample code.
{{{
@expose('json')
def values(self):
field = <<some valid field object>>
s = select([field]).distinct()
conn = DBSession.connection()
results = conn.execute(s).fetchall()
print results,type(results),type(results[0])
return dict(results=results)
}}}
the print outputs
{{{
[(u'123324',), (u'122245',), (u'123323',), (u'123322',)] <type 'list'>
<class 'sqlalchemy.engine.base.RowProxy'>
}}}
while the server throws this traceback:
http://paste.chrisarndt.de/paste/0f8abe7de1304d75bb8952628d29e6fe
--
Ticket URL: <http://trac.turbogears.org/ticket/2055>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---