Desperately Need Help on CX_ORACLE( in real trouble at work - I voted for robot framework )

655 views
Skip to first unread message

alister darrel

unread,
Feb 28, 2017, 1:01:59 AM2/28/17
to robotframework-users
Hi I am getting this error

I installed 64 bit OracleXE112_Win64.zip
Then i installed the C:\instantclient-basiclite-nt-11.2.0.2.0 --- 32 bit ( My python is 32 bit so i am kind of confused)

Then i used Anacoda to install the cx_Oracle...
I am getting Error in PIP
I have set path also
%ORACLE_HOME% = C:\oraclexe\app\oracle\product\11.2.0\server\

Auto Generated Inline Image 1
Auto Generated Inline Image 2

Jerry Schneider

unread,
Feb 28, 2017, 8:26:02 AM2/28/17
to robotframe...@googlegroups.com
All of the errors you have shown/stated have nothing to do with Robotframework or any of its extended libraries.  This is all in the python install and setup.

I have never used Anaconda Python or its tools and Windows is not my preferred platform.  It appears that your python execution/library path is not being defined correctly.  I have worked with a lot of python database libraries in the past, unfortunately never Oracle.  Let's start by trying some basic troubleshooting.

You say you have 32bit Python installed, but the below screenshot seems to show 64bit Python started [MSC v.1500 64 bit (AMD64)]?  It appears you have ActiveState installed as well, is that just the IDE or does it include Python as well?  Can you verify your python and make sure you have the same for the cx_oracle library? 

Is there a reason you have chosen to use Anaconda Python instead of Python from Python.org?

You say you are getting an error with pip, but never show/say what that is?  I have never used conda, only pip and easy_install

Have you rebooted since installing python and cx_oracle library?  If you look at your python installed site-packages directory, do you see the cx_oracle directory/files there (on my setup, that is C:\Python27\Lib\site-packages)?

Remember, the problems here have nothing to do with Robotframework or it's installers.  If this doesn't work, Robotframework won't work either, but Robotframework does not control any of this install process.  It comes into play AFTER this is all working.

The setup I have gotten working in the past is to:
Install python (64bit on 64bit OS) from python.org, version 2.7.x
Install VCForPython (Microsoft C for python
Ensure paths are setup correctly and rebooted computer
then use pip to install database library (psycopg2, mysqldb, pymssql etc.....)
then use pip to install Robotframework and it's extended libraries

Jerry S
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

-- 
http://www.linkedin.com/in/jerryschneider
Linux registered user #475536
Ubuntu registered user #28583

Sajjad Malang

unread,
Feb 28, 2017, 8:53:18 AM2/28/17
to robotframe...@googlegroups.com
Hello,
Not sure why are are installing cx_Oracle instead of using the RF DatabaseLibrary [http://franz-see.github.io/Robotframework-Database-Library/].

I have Anaconda Python 2.7.9 setup

I installed relevant oracle client libraries.
then RF
then robotframework-databaselibrary


in my script i have
Library           DatabaseLibrary


to connect
Connect To Database Using Custom Params    cx_Oracle    '${db username)/$(password}@${db}'

Hope this helps.

Thanks,

Regards,
\Sajjad.



To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
-- 
http://www.linkedin.com/in/jerryschneider
Linux registered user #475536
Ubuntu registered user #28583

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.



--
Regards,
\Sajjad.

alister darrel

unread,
Feb 28, 2017, 5:54:32 PM2/28/17
to robotframework-users
Thanks a lot guys for Replying, But not yet working

@Sajjad.. I am trying ur suggesstion ,but getting this error
**************************************

Starting test: TestingProject.Login.Connect To Database.OracleLibrary
20170228 16:47:33.050 :  FAIL :
DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified

Ending test:   TestingProject.Login.Connect To Database.OracleLibrary
*******************************************
Please find the ORA File
XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MyLap)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

I HAVE INSTALLED A ORACLE DB (EXPRESS 64 bit) and the server is running. I also downloaded a thin client and placed in C drive. Server is running
To post to this group, send email to robotframe...@googlegroups.com.
-- 
http://www.linkedin.com/in/jerryschneider
Linux registered user #475536
Ubuntu registered user #28583

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.



--
Regards,
\Sajjad.

Auto Generated Inline Image 1

Sajjad Malang

unread,
Feb 28, 2017, 6:33:56 PM2/28/17
to aliste...@gmail.com, robotframework-users
This seems to be a connection issue. Could be many things, host name resolution or firewall... See if you can get a response from your server with the tnsping command. If you can't, then resolve that problem. Once you can connect from your command line then it will work through rf. 

Thanks, 

Regards, 
\Sajjad. 

To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
-- 
http://www.linkedin.com/in/jerryschneider
Linux registered user #475536
Ubuntu registered user #28583

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
\Sajjad.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

alister darrel

unread,
Feb 28, 2017, 7:09:26 PM2/28/17
to robotframework-users, jer...@gmail.com
Hi Jerry,
Thanks for your reply, i have a working robotframework and i really dont want to re-install the whole package.


You say you have 32bit Python installed, but the below screenshot seems to show 64bit Python started [MSC v.1500 64 bit (AMD64)]?  It appears you have ActiveState installed as well, is that just the IDE or does it include Python as well?  Can you verify your python and make sure you have the same for the cx_oracle library? 

I am attaching the error message and also the version of python. I dont know whats a ActiveState is :(

I think, anaconda installs another Python (not sure read some where)



Is there a reason you have chosen to use Anaconda Python instead of Python from Python.org?
PIP is giving error
I rebooted like 10 times

I have attached the screenshot. Any help is really really appreciated

Thanks,
Alister
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
screenshot.docx
error.png
import error.png
python.png

Sajjad Malang

unread,
Mar 1, 2017, 3:54:50 AM3/1/17
to aliste...@gmail.com, robotframework-users, jer...@gmail.com
Hello,
Can you please post your connection string that you are using?

try various combinations of connection string below.


Connect To Database Using Custom Params    cx_Oracle    'scott/tiger@server:1521/orcl'

  • "server" is the server, or the IP address if you want.
  • "1521" is the port that the database is listening on.
  • "orcl" is the name of the instance (or database service).
are you able to connect from command line? with tnsping or sqlplus?

Hope this helps..

Thanks,

Regards,
\Sajjad.



To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

-- 
http://www.linkedin.com/in/jerryschneider
Linux registered user #475536
Ubuntu registered user #28583

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.



--
Regards,
\Sajjad.

Reply all
Reply to author
Forward
0 new messages