getting interface error after changing the DB connection details

7 views
Skip to first unread message

Raghunath Raghava

unread,
Oct 26, 2016, 8:28:58 AM10/26/16
to Django REST framework
Hi All,

I am having the following " interface error : not connected"  to the DB while connecting to the DB through DRF.

whereas I have written a separate test class for connection to the DB  it works fine , but when I am trying to do it using the DRF I am getting issues . I am using the cx_oracle driver for getting connected.

the test connection when I run works fine

$> /usr/local/bin/python testDBConn.py
select count(*) from boa_packages
[(3,)]

but the same DB credentials when I am working with the DRF , its giving me the error , can someone point me to the issue

mycursor.execute(sqlqry)
InterfaceError: not connected

I have set the LD_LIBRARY_PATH in the same python script using os.environ , should I use something else. Appreciate some help in this regard.
further earlier the same code used to work perfectly when I was connecting to a testDB , but now I am trying to connect to the production DB which is where the issue is.

thanks 
Raghu

 

Xavier Ordoquy

unread,
Oct 26, 2016, 8:47:00 AM10/26/16
to django-res...@googlegroups.com
Hi,
DRF uses the Django ORM layer and has no specific code for the databases.
You’ll probably have more answers on the Django mailing list itself.

Regards,
Xavier,
Linovia.

Reply all
Reply to author
Forward
0 new messages