"Unrecognized ICU conversion error." using pyodbc

Hey all,

We're using Vertica 6.1.3, and I have have a script that executes SQL statements in python using pyodbc. It has been working for a while, until a recent query on a table that contains a lot of various strings, it seems theres some sort of unicode issue, that causes the query to error out with "HY000] [Vertica][Support] (50310) Unrecognized ICU conversion error. (50310) (SQLGetData)"

The python implementation is pretty trivial, it takes in a sql string and calls cursor.execute, prints results.

The query looks like this (I've paired it down to a minimal case that seems to error out):
SELECT id, some_string  from s.strings;
The interesting thing is that for small limits (0-1000), the query returns fine, and if I JUST ask for the ids, it returns fine. It seems that for some particular string(s) that the error happens.

The connection string is pretty simple (anonymized values):
'DRIVER=Vertica;' +  'SERVER=server.hostname;' +  'PORT=5433;'  'DATABASE=database;' +  'UID=user;' +  'PWD=pw'  
And our odbcinst (using unixodbc on centos 6):
[Vertica]Description = "Vertica ODBC Driver"
Driver = /opt/vertica/lib64/libverticaodbc.so
vertica.ini:
[Driver]ODBCInstLib=/usr/lib64/libodbcinst.so
ErrorMessagesPath=/opt/vertica/lib64
LogLevel=4
LogPath=/tmp
Locale=en_US
I've also tried setting the charset to UTF-8 in the connection string and this didn't resolve the issue. I also tried a pyodbc patch listed here: https://code.google.com/p/pyodbc/issues/detail?id=78&can=1&q=UTF-16 but to no avail either.

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file