Python Forum
cx_Oracle.DatabaseError: ORA-12541: TNS:no listener
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cx_Oracle.DatabaseError: ORA-12541: TNS:no listener
#1
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
Reply
#2
Maybe this could help
https://stackoverflow.com/questions/1335...o-listener
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
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")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't stop keyboard listener to grab chars typed inside CTk window Valjean 9 1,375 Sep-25-2023, 08:07 PM
Last Post: deanhystad
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,402 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  keyboard listener DPaul 5 3,220 Mar-28-2021, 09:15 PM
Last Post: Larz60+
  cx_Oracle.DatabaseError: Error while trying to retrieve text from error ORA-01804 rajeshparadker 0 8,649 Nov-12-2020, 07:34 PM
Last Post: rajeshparadker
  Installing cx_Oracle 64-bit on AIX Nash 0 2,033 Dec-10-2019, 12:20 AM
Last Post: Nash
  Oracle Merge using cx_oracle raulp2301 0 4,785 Mar-15-2019, 12:56 AM
Last Post: raulp2301
  [split] Help with cx_Oracle gnishakamath 0 2,800 Jan-24-2019, 07:01 PM
Last Post: gnishakamath
  Help with cx_Oracle anandoracledba 0 3,260 Dec-04-2018, 02:08 AM
Last Post: anandoracledba
  Getting an error while connecting oracle DB from Python : cx_Oracle.DatabaseError: OR dinesh1393 0 3,534 Oct-25-2018, 02:44 PM
Last Post: dinesh1393
  cx_Oracle module not found error PRADEEP 1 3,299 Sep-12-2018, 11:10 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020