Skip to content

User-defined type not accessible by connection.gettype() #531

@PVSekhar1234

Description

@PVSekhar1234
  1. What versions are you using?

23.9.0.25.7
oracledb.version: 3.3.0
platform.platform: Linux-5.4.17-2136.342.5.el8uek.x86_64-x86_64-with-glibc2.28
sys.maxsize > 2**32: True
platform.python_version: 3.12.9

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

Crash

  1. What error(s) or behavior you are seeing?
Traceback (most recent call last):
  File "/home/user1/main.py", line 16, in <module>
    x = connection.gettype('TEMP.V_LIST')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user1/env/lib/python3.12/site-packages/oracledb/connection.py", line 931, in gettype
    obj_type_impl = self._impl.get_type(self, name)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/oracledb/impl/thin/connection.pyx", line 552, in oracledb.thin_impl.ThinConnImpl.get_type
  File "src/oracledb/impl/thin/dbobject_cache.pyx", line 595, in oracledb.thin_impl.ThinDbObjectTypeCache.get_type
  File "src/oracledb/impl/thin/dbobject_cache.pyx", line 571, in oracledb.thin_impl.ThinDbObjectTypeCache._lookup_type
  File "/home/user1/env/lib/python3.12/site-packages/oracledb/errors.py", line 199, in _raise_err
    raise error.exc_type(error) from cause
oracledb.exceptions.ProgrammingError: DPY-2035: invalid object type name: "TEMP.V_LIST"
  1. Does your application call init_oracle_client()?

Thin mode

  1. Include a runnable Python script that shows the problem.

Type definition:

CREATE OR REPLACE PACKAGE temp AS
    TYPE v_list IS TABLE OF VECTOR;
END;
/
import oracledb
import sys
import platform

connection = oracledb.connect(
    user = '<username>',
    password = '<password>',
    dsn = '<dsn>')
cursor = connection.cursor()

x = connection.gettype('TEMP.V_LIST')

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