Python oracle connection script  works in IDLE but not in a toolbox in arcgis

579
0
05-16-2014 04:25 AM
MarcusSilva1
New Contributor II
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
Tags (2)
0 Kudos
0 Replies