为什么会出现此Python数据库连接错误?

时间:2019-05-01 10:22:47

标签: python cx-oracle

  

错误:tns:listener在connect_data中未获得service_name

import cx_Oracle
con = cx_Oracle.connect('hr/hr@localhost')
if  con!= None:
    print('Connection established successfully')
    print('Version:',con.version)
else:
    print('Connection not established')
con.close()

1 个答案:

答案 0 :(得分:0)

pycurl.Curl