Trying to understand an error message

larry price <[email protected]> Wed, 31 Aug 2005 15:52:37 -0700
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
I'm using a dictionary interpolated string to create a query statement.
When I generate the query by hand sql =3D query % params
and execute the sql from inside psql, it works.

when i create cursor and use cursor.execute(query,params)
i get the following traceback

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/tmp/python-5481BIu.py", line 134, in insert_title
  File "/usr/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 3048,
in execute
    self.res =3D self.conn.conn.query(_qstr % parms)
TypeError: float argument required

line 3048 seems to be where the Exception is handled, but the
'self.res =3D ...' line occurs in method callproc, and I don't see where
it gets called from inside the method execute.

the only oddball column is one that is of type numeric(9,2)
do I need to wrap this in PgNumeric before I hand the dictionary to execute
Or is there something deepr going on?


--=20
http://Zoneverte.org -- information explained
Do you know what your IT infrastructure does?


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf