oracle num curs,cx_Oracle.Cursor no attribute 'numbersAsStrings'

环境:django 1.8.7,python 2.7,cx_Oracle 6.1 ,oracle 11.2

最近在liunx服务器上安装了cx_Oracle,默认给我装了6.1版本,结果测试起来各种异常,先是单独写个py文件测试连接oracle,报

cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help

这个是由于没安装oracle客户端引起,下个oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm安装,修改环境变量解决,百度也有各种例子,不细说

然后整合django去操作oracle库,报

cx_Oracle.Cursor no attribute 'numbersAsStrings'

国内碰到的人少,只能google去了,看到一句

The cursor attribute

numbersAsStrings

is deprecated and will be removed in cx_Oracle 6. An output type handler should be used instead.

意思是cx_Oracle 6.0中删除numbersAsStrings方法,既然6.0删除了,那我降级试试呢?于是

pip uninstall cx-oracle

pip install cx-oracle==5.2

问题解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值