ProgrammingError: LOB variable no longer valid after subsequent fetch

ProgrammingError: LOB variable no longer valid after subsequent fetch

Error when selecting a column ps_retourintervention

当我尝试 select 列 ps_retourintervention 并将其放入 pandas 数据框时出现此错误。

当 select 从数据库中的相同 table 中获取其他列时,此代码有效。

当我在 SQL 开发人员中执行此查询时,它也有效,这里是它的结果。

这是 cx_Oracle 5 及更早版本的限制。新版本(cx_Oracle6)没有这个限制。您可以使用此命令升级:

python -m pip install cx_Oracle --upgrade

无法更新的请关注link, http://kamushin.github.io/learning/python_oracle.html

迭代游标对象并将BLOB对象转换为str。