oracle / python-oracledb

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the renamed, new major release of cx_Oracle
https://oracle.github.io/python-oracledb
Other
308 stars 61 forks source link

Thick mode: Connection.gettype error #251

Closed hummeltech closed 2 months ago

hummeltech commented 8 months ago
  1. What versions are you using?

    platform.platform: Linux-6.5.9-arch2-1-x86_64-with-glibc2.38
    sys.maxsize > 2**32: True
    platform.python_version: 3.11.5
    oracledb.__version__: 1.4.2
  1. Is it an error or a hang or a crash? Error

  2. What error(s) or behavior you are seeing? Connection.gettype() is failing when using Thick mode, however runs without error when using Thin mode.

    Thick mode:

    >>> connection.gettype("PDBADMIN.TESTTEST.STR_ARR")
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.11/site-packages/oracledb/connection.py", line 437, in gettype
        obj_type_impl = self._impl.get_type(self, name)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "src/oracledb/impl/thick/connection.pyx", line 539, in oracledb.thick_impl.ThickConnImpl.get_type
      File "src/oracledb/impl/thick/utils.pyx", line 431, in oracledb.thick_impl._raise_from_odpi
      File "src/oracledb/impl/thick/utils.pyx", line 421, in oracledb.thick_impl._raise_from_info
    oracledb.exceptions.DatabaseError: ORA-04043: object PDBADMIN.TESTTEST.STR_ARR does not exist

    Thin mode:

    >>> connection.gettype("PDBADMIN.TESTTEST.STR_ARR")
    <oracledb.DbObjectType PDBADMIN.TESTTEST.STR_ARR>