Closed end1ess1 closed 2 months ago
This is not a bug! The use of asyncio mandates thin mode. You cannot fall back to thick mode in that case. You will need to use the regular synchronous approach if you want to fall back to thick mode when connecting to an incompatible database.
Closing - this has a straightforward answer.
Oracle 12
platform.platform: Windows-10-10.0.19043-SP0 sys.maxsize > 2**32: True platform.python_version: 3.12.2 oracledb.version: 2.1.0
Crash
DPY-2019: python-oracledb thick mode cannot be used because a thin mode connection has already been created
Yes. Im trying to use thin mode first and switch to thick when the database is incompatible
import asyncio import oracledb from data import client_path,user,password,dsn
async def main(): oracledb.init_oracle_client(lib_dir=client_path) async with oracledb.connect_async(user=user, password=password, dsn=dsn) as connection: with connection.cursor() as cursor: await cursor.execute("select user from dual") async for result in cursor: print(result)
asyncio.run(main())
I saw that you have already solved the problem, it works with connect(), and with async_connect() doesn't work