executemany(None, [[1], [1.0]]) -> TypeError: expecting integer · Issue #82 · oracle/python-cx_Oracle (original) (raw)

Issue

c.executemany(None, [[1], [1.0]]) generates the exception TypeError: expecting integer because the first value is an integer, and the second one not.

This worked fine with cx_Oracle 5.1 (and I think 5.2 too).

I'm not sure if this is really a bug, please confirm. I couldn't find in the documentation the exact behavior.

How to reproduce

import cx_Oracle conn = cx_Oracle.connect('user', 'pass', 'dev') c = conn.cursor() c.prepare("""not needed""") try: c.executemany(None, [[1], [1.0]]) # -> TypeError: expecting integer finally: conn.rollback() c.close() conn.close()

Environment

  1. Python 2.7.13, 32-bit
  2. cx_Oracle 6.0.2
  3. InstantClient 11.2 (unzip)
  4. Oracle Database 12.1.0.2.0
  5. Windows 7 x64
  6. cx_Oracle was directly installed with pip, not compiled.

Thanks for your hard work.