Python Forum

Full Version: cx_Oracle.DatabaseError: ORA-12541: TNS:no listener
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am getting this error while connecting DB

import cx_Oracle
connection = cx_Oracle.connect("USERNAME", "PWD", "HOST/DEV")

Operating System: Windows7
Python version : 3.7.4-64 bit
Oracle Client: 11.2.0
PyCharm: x64

In my desktop i have multiple clients are installed-Oracle10g, 11g, R12c

Is this causing the problem.

Is there anyway to set listener path connecting to DB through PyCharm
My issue is resolved after adding the port number to host name

import cx_Oracle
connection = cx_Oracle.connect("USERNAME", "PWD", "HOST:PORT NUMBER/DEV")