pyodbc: Not working with Python 3.4.3 on OS X (Vertica driver)

I am getting the following error when connecting to Vertica:

>>> res = cursor.execute("select version()")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyodbc.ProgrammingError: ('42601', '[42601] ERROR 4856:  Syntax error at or near "��������� (4856) (SQLExecDirectW)')

Wondering if this has been encountered before. Works on Python 2 on the same host so I doubt it’s iODBC.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

After some more experimentation and comparing to a Linux box, I can get it to work in python 3 if I set the VERTICAINI environment variable, and I set DriverManagerEncoding=UTF-16 in vertica.ini. It is likely that this is not a bug in pyodbc. It is just hard to get the system configuration right.