I am using Psycopg2 with PostgreSQL 8.4. While reading from a huge table, I suddenly get this cryptic error at the following line of code, after this same line of code has successfully fetched a few hundred thousand rows.
somerows = cursorToFetchData.fetchmany(30000)
Can you paste in the data from the row that's causing the problem? At a guess I'd say it's a badly formatted date entry, but hard to say.
(Can't comment, so has to be in a answer...)