且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

混淆解密错误代码Python模块以连接到Oracle(cx_Oracle)

更新时间:2021-07-27 23:08:37

抱歉造成的歉意.错误消息中有一个错误.这仅在非常旧的Oracle Client库版本中发生.我刚刚在这里更正了这个问题: https://github.com/oracle/odpi/commit/d2fea3801286d054e18b0102e60a69907b7faa9a ,并将很快作为cx_Oracle 7.1.1的一部分发布.

Apologies for the confusion. There was a bug in the error message. This only occurs with very old versions of the Oracle Client libraries. I've just corrected this here: https://github.com/oracle/odpi/commit/d2fea3801286d054e18b0102e60a69907b7faa9a and that will be released as part of cx_Oracle 7.1.1 soon.

因此错误消息真正要告诉您的是,您需要具有11.2或更高版本的Oracle Client库,并且版本足够老,甚至不知道如何告诉您它是哪个版本!因此可能是8i或9i或10g的早期版本.对于那些较旧的版本,它们通常存储在c:\ Windows \ system32中,因此优先于您可能已安装的其他库.您可以通过将PATH环境变量设置为在开始处包含C:\ app \ client \ corporateDrone \ product \ 12.1.0 \ client_1 \ bin来强制执行此问题.如果这样做没有帮助,则可能必须找到并删除较旧的OCI.dll版本-请记住,这样做会影响依赖于此的任何软件!

So what the error message is really trying to tell you is that you need to have 11.2 or higher Oracle Client libraries and you have a version old enough that it doesn't even know how to tell you what version it is! So likely 8i or 9i or early versions of 10g. With those older versions they were frequently stored in c:\Windows\system32 and thus take precedence over other libraries that you may have installed. You can force the issue by setting your PATH environment variable to include the C:\app\client\corporateDrone\product\12.1.0\client_1\bin at the beginning. If that doesn't help, you may have to find and remove the older version of OCI.dll -- keeping in mind that doing so will affect any software that depends on it!

可以在此处找到官方文档: https://cx-oracle .readthedocs.io/en/latest/index.html .有一个增强请求,要求您将其包含在内置帮助中,而您注意到这些帮助没有任何用处. :-)您可以在此处看到增强请求: https://github.com/oracle /python-cx_Oracle/issues/175 .

The official documentation can be found here: https://cx-oracle.readthedocs.io/en/latest/index.html. There is an enhancement request to include these in the builtin help that you noted doesn't have anything useful. :-) You can see the enhancement request here: https://github.com/oracle/python-cx_Oracle/issues/175.

希望能减轻您的困惑!