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)
psycopg2.DataError: invalid value "LÃ" for "DD"
DETAIL: Value must be an integer.
My problem is that I have no column named "DD", and about 300 columns in that table (I know 300 columns is a design flaw). I would appreciate a hint about the meaning of this error message, or how to figure out where the problem lies. I do not understand how Psycop2 can have any requirements about the datatype while fetching rows.