Skip to Content
1
Feb 17, 2022 at 08:32 AM

Unable to connect to ASE 16 with python 3.8 on RHEL8

514 Views Last edit Feb 17, 2022 at 01:51 PM 2 rev

Hi,

I've a ASE 16 installed on RHEL 8 with python3.8 and I'm unable to connect to the server with python.

If I do not specify the password with the default test.py, I have a Login Failed (normal behaviour) :

python test.py

Cannot raise error, context is NULL

Traceback (most recent call last):

File "test.py", line 55, in

conn = sybpydb.connect(user='sa', password='')

sybpydb.ProgrammingError: ('Login failed.\n', 4002)

If I put the good password , it seems that the connection is done but I have the following error message :

python test.py

Traceback (most recent call last):

File "test_HBC.py", line 55, in

conn = sybpydb.connect(dsn="user=sa;password=XXXXXXX")

sybpydb.ProgrammingError: ('ct_con_props(): user api layer: external error: An illegal value of 9234 given for parameter property.', 5)

MyASE version is Adaptive Server Enterprise/16.0 SP03 PL10/EBF 29808 SMP/P/x86_64/SLES 11.1/ase160sp03pl10x/3880/64-bit/FBO/Wed May 12 20:32:12 2021

I tried to use all sybpydb.py installed on my server, the latest I have is in $SYBASE /OCS-16_0/python/python34_64r/lib

My PYTHONPATH is (I also tried with other python3x_64r versions)

setenv PYTHONPATH ${SYBASE}/${SYBASE_OCS}/python/python37_64r/lib:${SYBASE}/${SYBASE_OCS}/lib

My PYthon version is :

Python 3.8.8 (default, Aug 11 2021, 06:52:42)

[GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] on linux

Python 3.8 is not supported ? I should install python 3.7 instead ?thank you for your helpRegardsHervé