I encounter DatabaseError: Error while trying to retrieve text for error ORA-01804 when I try to connect python to oracle. I have downloaded instant client 19.3.0.0.0
I am using MacBook(10.15.3). Here is my code:
! pip install cx_Oracle
import io
import base64
from urllib.request import urlopen
import os
os.chdir("/Users/aa/Option/Oracle/instantclient_19_3-2") # use the path we copied from step 5
import cx_Oracle
dsn_tns = cx_Oracle.makedsn("aaa", "bbb", service_name="ccc")
conn = cx_Oracle.connect(user= "ddd", password="222", dsn=dsn_tns)
c = conn.cursor()
it returns:
Requirement already satisfied: cx_Oracle in /Users/aa/opt/anaconda3/lib/python3.7/site-packages (7.3.0)
---------------------------------------------------------------------------
DatabaseError Traceback (most recent call last)
<ipython-input-17-d2cb8e0df445> in <module>
10
11 dsn_tns = cx_Oracle.makedsn("aaa", "bbb", service_name="ccc")
---> 12 conn = cx_Oracle.connect(user= "ddd", password="222", dsn=dsn_tns)
13 c = conn.cursor()
DatabaseError: Error while trying to retrieve text for error ORA-01804
How can I solve it? Thank you very much.