isql works, not python: NoSQLGetPrivateProfileString error

Moderator: NorbertKrupa

Post Reply
yang
Newbie
Newbie
Posts: 11
Joined: Wed Jul 04, 2012 11:27 am

isql works, not python: NoSQLGetPrivateProfileString error

Post by yang » Thu Jul 05, 2012 4:21 am

Anyone know why this might be happening?

Code: Select all

$ cat ~/.odbc.ini
[ODBC Data Sources]
VerticaDSN = "bigbang"

[bigbang]
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = bigbang
Servername = localhost
UID = dbadmin
PWD = ...
Port = 5433

$ LD_LIBRARY_PATH=/opt/vertica/lib64:/opt/vertica/lib64/libverticaodbc.so:$LD_LIBRARY_PATH python -c "import pyodbc; pyodbc.connect('DSN=bigbang')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
pyodbc.Error: ('HY000', '[HY000] [unixODBC][DSI] The error message NoSQLGetPrivateProfileString could not be found in the en-US locale. Check that /en-US/ODBCMessages.xml exists. (-1) (SQLDriverConnect)')

$ isql -v bigbang
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> 

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: isql works, not python: NoSQLGetPrivateProfileString err

Post by id10t » Thu Jul 05, 2012 7:04 am

Hi yang!

viewtopic.php?f=21&t=209&p=512

PS use search, read docs

yang
Newbie
Newbie
Posts: 11
Joined: Wed Jul 04, 2012 11:27 am

Re: isql works, not python: NoSQLGetPrivateProfileString err

Post by yang » Thu Jul 05, 2012 9:29 am

I did actually already see that but configuring vertica.ini/VERTICAINI doesn't appear to be doing anything for me.

Edit: Actually it does work. I wasn't exporting my environment variable correctly.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: isql works, not python: NoSQLGetPrivateProfileString err

Post by JimKnicely » Mon Jul 09, 2012 8:10 pm

Cool! So you got it working, yang?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

yang
Newbie
Newbie
Posts: 11
Joined: Wed Jul 04, 2012 11:27 am

Re: isql works, not python: NoSQLGetPrivateProfileString err

Post by yang » Mon Jul 09, 2012 8:14 pm

Yes, thank you

Post Reply

Return to “ODBC”