Re: "ProgrammingError: can't adapt" when passing arguments to cursor.execute

Tim Roberts <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Organization Providenza & Boekelheide, Inc.
Message-ID <[email protected]>
William Carithers wrote:
> I thought this problem might need you to solve. The problem is probably the
> numpy.float32 . Can I fix this with a cast? Would float(...the thing that is
> numpy.float32...) work?
> Here's the type list for the script:
>   

It's interesting to me that this is the first time in this moderately
extensive thread that you've mentioned that the values come from numpy. 
Of course that's the issue.  Casting to float will solve it, as will
adding an "adapter" for numpy.float32 directly.

-- 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.