- Notifications
You must be signed in to change notification settings - Fork 96
Closed
Labels
Description
- What versions are you using?
platform.platform: Windows-10-10.0.22631-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.9.13
oracledb-2.5.1
Oracle 19/21
-
Is it an error or a hang or a crash?
code crash with an exception -
What error(s) or behavior you are seeing?
RuntimeWarning: coroutine 'AsyncConnection.createlob' was never awaited await self._impl.execute(self) RuntimeWarning: Enable tracemalloc to get the object allocation traceback Traceback (most recent call last): File "XXX\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "XXX\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\python\core\debugpy\__main__.py", line 71, in <module> cli.main() File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 501, in main run() File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 351, in run_file runpy.run_path(target, run_name="__main__") File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 310, in run_path return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname) File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 127, in _run_module_code _run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name) File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 118, in _run_code exec(code, run_globals) File "YYYY\Oracledb_Issies.py", line 18, in <module> asyncio.run(main()) File "XXX\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "XXX\lib\asyncio\base_events.py", line 647, in run_until_complete return future.result() File "YYYY\Oracledb_Issies.py", line 14, in main await cur.execute(""" begin test1(p_prm => :clobprm); end;""", File "XXX\lib\site-packages\oracledb\cursor.py", line 964, in execute await self._impl.execute(self) File "src\\oracledb\\impl/thin/cursor.pyx", line 280, in execute File "src\\oracledb\\impl/thin/cursor.pyx", line 124, in oracledb.thin_impl.BaseThinCursorImpl._preprocess_execute File "src\\oracledb\\impl/base/cursor.pyx", line 352, in oracledb.base_impl.BaseCursorImpl._perform_binds File "src\\oracledb\\impl/thin/var.pyx", line 78, in oracledb.thin_impl.ThinVarImpl._bind AttributeError: 'coroutine' object has no attribute 'write' - Does your application call init_oracle_client()?
no
- Include a runnable Python script that shows the problem.
The simple procedure in DB:
create or replace procedure test1(p_prm clob) as begin null; end test1; import oracledb import asyncio async def main(): pool = oracledb.create_pool_async(dsn = "XXX") con = await pool.acquire() async with con.cursor() as cur: await cur.execute(""" begin test1(p_prm => :clobprm); end;""", clobprm = '123'*20000) asyncio.run(main())