ittechlab
asked on
python database connection issue
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)")
i have freeTDS and unixODBC installed. not sure what is the cause.
i have freeTDS and unixODBC installed. not sure what is the cause.
Can you show the fragment of your code that causes the error?
ASKER
Here is the output from strace.
lseek(4, 0, SEEK_SET) = 0
lseek(4, 0, SEEK_CUR) = 0
read(4, "import pyodbc\nimport numpy as np"..., 8192) = 916
close(4) = 0
write(2, " conn2=pyodbc.connect('driv er"..., 119 conn2=pyodbc.connect('driv er={SQL Server};server=mydb-server ;database= myDB;trust ed_connect ion=true')
) = 119
write(2, "pyodbc.Error: ('01000', \"[01000]"..., 129pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)")
) = 129
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x3d3080f7e0}, {0x7f88423fa9a0, [], SA_RESTORER, 0x3d3080f7e0}, 8) = 0
munmap(0x7f882924c000, 262144) = 0
munmap(0x7f882918c000, 262144) = 0
munmap(0x7f8828be3000, 262144) = 0
munmap(0x7f88278d5000, 262144) = 0
close(3) = 0
futex(0x7f8826a31984, FUTEX_WAKE_PRIVATE, 2147483647) = 0
munmap(0x7f8836c36000, 33554432) = 0
munmap(0x7f8834235000, 33554432) = 0
munmap(0x7f8831834000, 33554432) = 0
close(0) = 0
lseek(4, 0, SEEK_SET) = 0
lseek(4, 0, SEEK_CUR) = 0
read(4, "import pyodbc\nimport numpy as np"..., 8192) = 916
close(4) = 0
write(2, " conn2=pyodbc.connect('driv
) = 119
write(2, "pyodbc.Error: ('01000', \"[01000]"..., 129pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)")
) = 129
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x3d3080f7e0}, {0x7f88423fa9a0, [], SA_RESTORER, 0x3d3080f7e0}, 8) = 0
munmap(0x7f882924c000, 262144) = 0
munmap(0x7f882918c000, 262144) = 0
munmap(0x7f8828be3000, 262144) = 0
munmap(0x7f88278d5000, 262144) = 0
close(3) = 0
futex(0x7f8826a31984, FUTEX_WAKE_PRIVATE, 2147483647) = 0
munmap(0x7f8836c36000, 33554432) = 0
munmap(0x7f8834235000, 33554432) = 0
munmap(0x7f8831834000, 33554432) = 0
close(0) = 0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
found the solution myself.