[Twisted-Python] getting "can't serialize output " error while returning numeric data from postgresql.
exarkun at divmod.com
Wed Jan 28 08:49:06 EST 2009
On Wed, 28 Jan 2009 16:50:10 +0530, Krishnakant <hackingkk at gmail.com> wrote:
>I think this must be a simple thing and many of you might be knowing the
>But I am new to twisted and for me this is a big challenge.
>I am connecting my xmlrpc based twisted application (server ) to a
>postgresql database using python-psycopg2
>I am returning a result set from a function and the resultset is as a
>list which cursor.fetchone() returns.
>now my function called xmlrpc_getDetails(product_code):
> #code to execute query on cursur
> return resultset
>All works well untill i encounter a field of type numeric which has
>I et the can't serialize output error.
>I believe I have to register some kind of a system to cast the data in a
>way that twisted understands?
>how can I do this?
Twisted's XML-RPC support is based on the stdlib module `xmlrpclib´.
See http://docs.python.org/library/xmlrpclib.html for details.
More information about the Twisted-Python