-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
Description
- What versions are you using?
platform.platform: Linux-6.1.0-18-amd64-x86_64-with-glibc2.36
sys.maxsize > 2**32: True
platform.python_version: 3.11.4
oracledb.version: 2.4.1
- Is it an error or a hang or a crash?
Error
- What error(s) or behavior you are seeing?
> connection
<oracledb.Connection to MYUSER@MYSERVICE>
> connection.gettype("MY_PKG.TAB_OF_RECORDS_TYP")
TypeError Traceback (most recent call last)
Cell In[5], line 1
----> 1 connection.gettype("MY_PKG.TAB_OF_RECORDS_TYP")
File ~/.cache/pypoetry/virtualenvs/vast-webapi-gexEMAwK-py3.11/lib/python3.11/site-packages/oracledb/connection.py:706, in Connection.gettype(self, name)
701 """
702 Return a type object given its name. This can then be used to create
703 objects which can be bound to cursors created by this connection.
704 """
705 self._verify_connected()
--> 706 obj_type_impl = self._impl.get_type(self, name)
707 return DbObjectType._from_impl(obj_type_impl)
File src/oracledb/impl/thin/connection.pyx:434, in oracledb.thin_impl.ThinConnImpl.get_type()
File src/oracledb/impl/thin/dbobject_cache.pyx:564, in oracledb.thin_impl.ThinDbObjectTypeCache.get_type()
File src/oracledb/impl/thin/dbobject_cache.pyx:445, in oracledb.thin_impl.BaseThinDbObjectTypeCache._populate_type_info()
File src/oracledb/impl/thin/dbobject_cache.pyx:277, in oracledb.thin_impl.BaseThinDbObjectTypeCache._parse_tds()
File src/oracledb/impl/thin/dbobject_cache.pyx:523, in oracledb.thin_impl.ThinDbObjectTypeCache._get_element_type_obj()
TypeError: 'NoneType' object is not iterable- Does your application call init_oracle_client()?
no
- Include a runnable Python script that shows the problem.
create or replace package my_pkg as
type typ_record is record(
my_id my_table.my_id%type,
key_id my_table.key_id%type,
value my_table.value%type,
type tab_of_records_typ is table of typ_record;
end my_pkg;my_engine = create_engine("<myconnectionstring>")
connection = my_engine.raw_connection()
try:
driver_conn = connection.driver_connection
connection.gettype("MY_PKG.TAB_OF_RECORDS_TYP")
finally:
connection.close()