python connecting to Oracle using pyodbc sometimes kills python interpreter
Periodically when using pyodbc to create a connection to an oracle database, it ki开发者_C百科lls the interpreter.
import pyodbc
connectString = 'Driver={Microdsoft ODBC for Oracle};Server=<host>:<port>/<db>.<host>;uid=<username>;pwd=<password>'
cnxn = pyodbc.connect(connectString)
Say 1/5 of the time this will just drop me from the Python prompt (>>>) down to my dos prompt (C:)
Any ideas of why this happens or how to fix it?
We could not discover what was exactly causing this problem. Research leads us to think that there may be a problem with Python 2.7.1, PyODBC, and Win 2003 server.
To fix this problem we created a jar file that executed the permission check and then had the python script call that file and return the result
精彩评论