Skip to content

Error with fetchall() for clobs with existing but disabled json check constraint and non json conform content #507

Open
@Lunnaris01

Description

@Lunnaris01
  1. What versions are you using?

platform.platform: Linux-5.4.17-2136.342.5.3.el8uek.x86_64-x86_64-with-glibc2.28
sys.maxsize > 2**32: True
platform.python_version: 3.9.20
oracledb.version: 3.1.1

  1. Is it an error or a hang or a crash?

error

  1. What error(s) or behavior you are seeing?
  File "test.py", line 34, in <module>
    rows = cursor.fetchall()
  File ".venv/lib64/python3.9/site-packages/oracledb/cursor.py", line 777, in fetchall
    row = fetch_next_row(self)
  File "src/oracledb/impl/base/cursor.pyx", line 575, in oracledb.base_impl.BaseCursorImpl.fetch_next_row
  File "src/oracledb/impl/base/cursor.pyx", line 256, in oracledb.base_impl.BaseCursorImpl._create_row
  File "src/oracledb/impl/thick/var.pyx", line 189, in oracledb.thick_impl.ThickVarImpl._get_scalar_value
  File "src/oracledb/impl/thick/var.pyx", line 444, in oracledb.thick_impl.ThickVarImpl._transform_element_to_python
  File "src/oracledb/impl/thick/var.pyx", line 167, in oracledb.thick_impl.ThickVarImpl._get_lob_value
AttributeError: 'list' object has no attribute '_impl'
  1. Does your application call init_oracle_client()?

yes

  1. Include a runnable Python script that shows the problem.
   oracledb.init_oracle_client()
   conn = oracledb.connect(user=..., password=..., dns=...)


    sql = f"""
    SELECT * FROM my_clob_table
    """

    cursor.execute(sql)
    rows = cursor.fetchall()

The quintessence seems to be that we have a CLOB field where config parameters are saved in a manner like this:
[ { "name": "test123", "host": [ "host1", "host4", "host7"], "command_name": "dosomething", "command_params": ["param1", "param2", "param3"] } ]
which causes the fetchall to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions