Closed hl1 closed 10 months ago
workaround for those encountering similar issues is to convert pyodbc rows into regular list:
results = [list(row) for row in cursor.fetchall())]
but I am not looking for a workaround, I need a solution for this as pyodbc.rows are more powerful than a regular list. and converting a huge stack of code to the workaround above should be temporary and not the final solution.
I have pushed a patch that should correct this issue. If you are able to build from source you can verify that it corrects your issue as well.
results = [list(row) for row in cursor.fetchall())]
Thank you. Just changing from cx_Oracle to oracledb and hit the same issue.
I have pushed a patch that should correct this issue. If you are able to build from source you can verify that it corrects your issue as well.
I am not able to build from source but will be waiting on this to be released in future oracledb version
This has been included in python-oracledb 1.4.0 which was just released.
V.1.3.1 on windows and linux
error
DPY-2004: "parameters" argument should be a list of sequences or dictionaries, or an integer specifying the number of times to execute the statement
Does your application call init_oracle_client()? does not work regardless if it is thin or thick mode.
Include a runnable Python script that shows the problem.
with oracledb.connect(user=un, password=pw, dsn=cs) as connection: with connection.cursor() as oracle_cursor: oracle_cursor.executemany("insert into ParentTable values (:1, :2)", results)
type(results) -- returns <class 'list'> type(results[0]) -- return <class 'pyodbc.Row'>