On Wed, Apr 15, 2015 at 2:50 PM, Dick Kniep <dick@lindix.nl> wrote:
> DataError: character with byte sequence 0xe2 0x82 0xac in encoding "UTF8" has no equivalent in encoding "LATIN1"
This is a PostgreSQL error: most likely your connection encoding is in
LATIN1 instead of UTF8. Proof is also that you get the error on
execute (which is normally when the data is transferred to psycopg)
and not on fetch*() (when the typecasters are applied).
Try running "show client_encoding" in you database in psql to check if
this is the case. If not, there could be something in your python code
changing the encoding: check the value of cnn.encoding where the code
is executed.
The client encoding can be changed in psycopg with a
cnn.set_client_encoding('utf8').
-- Daniele