Python: Import Cx_Oracle Importerror: No Module Named Cx_Oracle Error Is Thown

wfastcgi fails import cx_Oracle, but `python -c "import cx_Oracle" succeeds

I am too embarrased to admit how long this has taken me, but I've found the answer.
FastCGI's core business is keeping subprocesses alive so that subsequent calls to the server do not require booting a Python environment. In other words, after installing a python package it is advised to reboot. I solved my first question on SO by rebooting..

The answer to this question got me thinking in the right direction.

Why does my code throw "NameError: name 'ModuleNotFoundError' is not defined" error?

Just to clarify the comments: as many said, ModuleNotFoundError is only available in Python 3.6 and later versions, but Python 2 must be used. However the ImportError exception is available in Python 2 and 3, it's just a bit less precise.

Replacing ModuleNotFoundError with ImportError should work.

Error: While importing 'new_app', an ImportError was raised

You have a simple typo, from the looks of it.

'set' should be 'set'.

Try that.

Robot Framework : Error while connecting Oracle Database through DatabaseLibrary

Can you try using -

Connect to Database using Custom Params  cx_Oracle  '${ABL_DBOBJECTS}/${abill_2808_prod}@${MTNIODC48}'

Also, you can add the dependency like

*** Settings ***
Library ..${/}..${/}lib${/}databaselibrary-0.6${/}DatabaseLibrary${/}

& download the DatabaseLibrary Here

Related Topics

Leave a reply