-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Labels
bugSomething isn't workingSomething isn't working
Description
- What versions are you using?
Oracle database 18.0.0.0.0
>>> import sys
>>> import platform
>>>
>>> print("platform.platform:", platform.platform())
platform.platform: Windows-10-10.0.19045-SP0
>>> print("sys.maxsize > 2**32:", sys.maxsize > 2**32)
sys.maxsize > 2**32: True
>>> print("platform.python_version:", platform.python_version())
platform.python_version: 3.12.3
>>>
>>> import oracledb
>>> print("oracledb.__version__:", oracledb.__version__)
oracledb.__version__: 3.4.0
-
Is it an error or a hang or a crash?
It's an error. -
What error(s) or behavior you are seeing?
Got exception below.
I think that error was created in this fix ORA-22922 in async LOB reading from cursor #500
We began instantiating an AsyncThinLobImpl object in place of an AsyncLOB. Since AsyncThinLobImpl lacks the _impl attribute, this change now triggers an AttributeError in the corresponding code. -
Does your application call init_oracle_client()?
Thin mode. -
Include a runnable Python script that shows the problem.
This test failed:
async def test_5728(async_conn, async_cursor):
"1940 - LOB in/out with modification"
var1 = await async_conn.createlob(oracledb.DB_TYPE_CLOB, 'abc'*100)
var2 = (await async_conn.gettype("UDT_TABLEOFNUMBER")).newobject()
var3 = async_cursor.var(oracledb.DB_TYPE_CLOB)
var4 = async_cursor.var(oracledb.DB_TYPE_VARCHAR)
await async_cursor.execute(
"begin pkg_TestLOBs.TestOut(:v1, :v2, :v3, :v4); end;", {"v1": var1, "v2": var2, "v3": var3, "v4": var4}
)
assert await var3.getvalue().read() == 'abc'*80
With this procedure:
procedure TestOut (
a_in_CLOB in clob,
a_Array out nocopy udt_TableOfNumber,
a_CLOB out nocopy clob,
a_String out varchar2
) is
begin
a_Array := udt_TableOfNumber();
a_Array.extend(100000);
for i in 1..10000 loop
a_Array(i) := 1234567890.1234567890;
end loop;
insert into testclobs(intcol, clobcol) values (10, empty_clob()) returning clobcol into a_CLOB;
if dbms_lob.isopen(a_CLOB) = 0 then
dbms_lob.open(a_CLOB, dbms_lob.lob_readwrite);
end if;
for i in 1..80 loop
dbms_lob.writeappend(a_CLOB, 3, 'abc');
end loop;
dbms_lob.close(a_CLOB);
a_String := lpad('a', 1000, 'a');
end;
Exception:
tests\test_5700_lob_var_async.py:542:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Python312\Lib\site-packages\oracledb\cursor.py:1198: in execute
await self._impl.execute(self)
src\oracledb\impl\thin\cursor.pyx:412: in execute
await protocol._process_single_message(message)
src\oracledb\impl\thin\protocol.pyx:886: in _process_single_message
async with self._request_lock:
src\oracledb\impl\thin\protocol.pyx:887: in oracledb.thin_impl.BaseAsyncProtocol._process_single_message
await self._process_message(message)
src\oracledb\impl\thin\protocol.pyx:840: in _process_message
raise
src\oracledb\impl\thin\protocol.pyx:820: in oracledb.thin_impl.BaseAsyncProtocol._process_message
await asyncio.wait_for(coroutine, timeout_obj)
C:\Python312\Lib\asyncio\tasks.py:520: in wait_for
return await fut
^^^^^^^^^
src\oracledb\impl\thin\protocol.pyx:874: in oracledb.thin_impl.BaseAsyncProtocol._process_message_helper
message.process(self._read_buf)
src\oracledb\impl\thin\messages\execute.pyx:289: in oracledb.thin_impl.ExecuteMessage.process
MessageWithData.process(self, buf)
src\oracledb\impl\thin\messages\base.pyx:780: in oracledb.thin_impl.Message.process
self._process_message(buf, message_type)
src\oracledb\impl\thin\messages\base.pyx:1258: in oracledb.thin_impl.MessageWithData._process_message
self._process_row_data(buf)
src\oracledb\impl\thin\messages\base.pyx:1338: in oracledb.thin_impl.MessageWithData._process_row_data
value = self._process_column_data(buf, var_impl,
src\oracledb\impl\thin\messages\base.pyx:1067: in oracledb.thin_impl.MessageWithData._process_column_data
column_value = buf.read_lob_with_length(self.conn_impl,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lob_impl = lob._impl
E AttributeError: 'oracledb.thin_impl.AsyncThinLobImpl' object has no attribute '_impl'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working