0

I issue this statement: db = cx_Oracle.connect("user/pass@IP/BKTDW")

and I get this error: Traceback (most recent call last): File "", line 1, in cx_Oracle.DatabaseError: Error while trying to retrieve text for error ORA-01804

It seems that connect method doen't work at all. I have installed the Oracle Client and I am connecting normally via Toad or Sql Developer.

Please Help!

bruce
  • 41
  • 2
  • 12
  • Possible duplicate of [Error while trying to retrieve text for error ORA-01804](https://stackoverflow.com/questions/12837811/error-while-trying-to-retrieve-text-for-error-ora-01804) – Никита Конин May 11 '18 at 15:26

2 Answers2

0

I had to set the ORACLE_HOME variable in the system variables and also add the bin directory in the PATH system variable. THNX

bruce
  • 41
  • 2
  • 12
0

Ensure that sqlplus is working from cmd line. It could be if on 64bit windows in has in PATH there is a target to non-64 bin version of oracle bin folder. In our case we ensured that 64bit location is placed in PATH . For instance place c:\Oracle\Ora11g_r2_x64\bin\ and remove c:\Oracle\ora11g_2\bin\, it was not related with ORACLE_HOME .

k4hvd1
  • 61
  • 4