The python code bellow works fine running in IDLE.
======================================================
#!/usr/bin/python
import cx_Oracle
connstr='scott/tiger'
connection = cx_Oracle.connect('c##tim/tim@//localhost:1521/xe')
print "Test connection finished"
======================================================
But when I attach it to a toolbox in arcgis 10.2 I get the following error message:
Traceback (most recent call last):
File "G:\TIM\Projeto2\Projeto\toolbox\coberturaCEP.py", line 437, in <module>
connection = cx_Oracle.connect("c##tim/tim@//localhost:1521/xe")
DatabaseError: ORA-06413: Conexão não aberta(Connection not open).
Does anyone have any ideas of what is happening?
Thanks in advance,
Marcus Silva