[cx-oracle-users] Illegal attribute type in Connection
Brought to you by:
atuining
From: Sven K. <s.k...@we...> - 2009-02-25 15:26:06
|
Hi everyone, I've some problems with connecting to ORACLE-Instance via cx_Oracle: For information: OS -> WIN XP Python-Version -> 2.5.2 cx_Oracle -> 5.0.1 for ORACLE 11g ORACLE-Installed-Versions -> 11g + 10g I compiled the code and tried it on my machine. It worked fine. Then I created a compiled-exe with py2exe. I put it on other machine. For Information: OS -> Win XP No Python installed -> Compiled-Exe of my program No cx_Oracle installed -> Compiled-Exe of my program ORACLE-Installed-Version -> 10g I tried it, but became following error: Connection_Connect():set driver name ORA-24315: illegal attribute type Connection_Connect():set driver name ORA-24315: illegal attribute type Python-Source: import sys import os import decimal import cx_Oracle class test_oracle: def __init__(self): return def work(self): dbuser = "DB_USER" dbpwd = "DB_USER_PWD" dbsid = "DB_SID" orapath = "C:\\oracle" dbtns = "DB_TNS" os.environ["ORACLE_SID"]=dbsid os.environ["ORACLE_HOME"]=orapath try: conn = cx_Oracle.Connection(dbuser, dbpwd) print "CONNECTED" conn.close() except cx_Oracle.DatabaseError, e: print e[0].context print e try: conn = cx_Oracle.Connection("%s/%s@%s" %(user,pwd,dsn)) print "CONNECTED" conn.close() except cx_Oracle.DatabaseError, e: print e[0].context print e if __name__ == "__main__": tst_ora = test_oracle() tst_ora.work() sys.exit Could you give me a hint, to solve this problem? Looks like a problem with the versions, don't it? Thanks, Sven _______________________________________________________________________ DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a |