Import a module inside sikulix script
Hi RaiMan,
I'm using the new sikulix version, it's way better btw!
However, I don't know if what i'm trying to do it's possible, I've this python module which I'm using as a "database layer", so all I need from the database I call this script and then use this inside my sikulix script.
The problem is, this database module use the library cx_Oracle an this has some C-based code, so when I import my database layer module inside my sikulix script I got this error:
error] script [ createPurchaseOrder ] stopped with error in line 6
[error] ImportError ( No module named cx_Oracle )
[error] --- Traceback --- error source first
line: module ( function ) statement
1: getData ( <module> ) import cx_Oracle
6: main ( <module> ) import getData
[error] --- Traceback --- end --------------
My sikulix script it's like this:
database_module = "C:\\PATH\
if not database_module in sys.path:
sys.
import getData
print(getData.
Do you have some suggestion?
I've a workaround as we discuss in this issue: https:/
However if i can use as a import in my script could be much better!
Thanks,
Antonio
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask ANTONIO CARLOS PAES NASCIMENTO for more information if necessary.