- What versions are you using?
I am using oracledb==3.4.2 in thin mode.
My Oracle Database version is 19.29.0.0.0 (Enterprise 19c).
My platform is as follows
import sys
import platform
print("platform.platform:", platform.platform())
print("sys.maxsize > 2**32:", sys.maxsize > 2**32)
print("platform.python_version:", platform.python_version())
> platform.platform: Windows-11-10.0.26100-SP0
> sys.maxsize > 2**32: True
> platform.python_version: 3.14.4
- Is it an error or a hang or a crash?
It is an error
- What error(s) or behavior you are seeing?
The error happens when establishing a connection using a TNSNAMES file that contains an IFILE directive and the config_dir parameter is explicitely passed.
Assuming config_dir='C:/Oracle/12.1.0/Client_lite/NETWORK/ADMIN' and IFILE="Q:\WAPPL\Ora11g\client_1\network\Admin\tnsnames.ora" this is the output I get.
DPY-4026: file 'C:/Oracle/12.1.0/Client_lite/NETWORK/ADMIN\"Q:\WAPPL\Ora11g\client_1\network\Admin\tnsnames.ora"' is missing or unreadable
[WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:/Oracle/12.1.0/Client_lite/NETWORK/ADMIN\\"Q:\\WAPPL\\Ora11g\\client_1\\network\\Admin\\tnsnames.ora"'
- Does your application call init_oracle_client()?
No, I use thin mode.
- Include a runnable Python script that shows the problem.
A reproducible example would be as follows (assuming a TNSNAMES.ORA file exists and that it has the IFILE directive established as mentioned in question 3):
import oracledb
with oracledb.connect(
user=os.environ['DB_USER'],
password=os.environ['DB_USER_PWD'],
dsn=os.environ['TNS_ALIAS'],
config_dir=os.environ['TNS_ADMIN']
) as con:
with con.cursor() as cur:
cur.execute("SELECT * FROM v$version")
print(cur.fetchall())
- Expected behaviour
Considering the purpose for which the IFILE directory was created, I believe that when the user explicitely passes the config_dir, the behaviour should be to look in both directories separately, not appending one to another and assuming that is the actual directory that should be looked into.
I am using
oracledb==3.4.2in thin mode.My Oracle Database version is
19.29.0.0.0(Enterprise 19c).My platform is as follows
It is an error
The error happens when establishing a connection using a TNSNAMES file that contains an
IFILEdirective and theconfig_dirparameter is explicitely passed.Assuming
config_dir='C:/Oracle/12.1.0/Client_lite/NETWORK/ADMIN'andIFILE="Q:\WAPPL\Ora11g\client_1\network\Admin\tnsnames.ora"this is the output I get.No, I use thin mode.
A reproducible example would be as follows (assuming a TNSNAMES.ORA file exists and that it has the
IFILEdirective established as mentioned in question 3):Considering the purpose for which the
IFILEdirectory was created, I believe that when the user explicitely passes theconfig_dir, the behaviour should be to look in both directories separately, not appending one to another and assuming that is the actual directory that should be looked into.