[Sikuli-driver] [Question #681767]: Import a module inside sikulix script
New question #681767 on Sikuli: https://answers.launchpad.net/sikuli/+question/681767 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 ( ) import cx_Oracle 6: main ( ) import getData [error] --- Traceback --- end -- My sikulix script it's like this: database_module = "C:\\PATH\\createPurchaseOrder.sikuli\\botlib\\src\\database" if not database_module in sys.path: sys.path.append(database_module) import getData print(getData.getPORef('rconnection_string',, '77713060')) Do you have some suggestion? I've a workaround as we discuss in this issue: https://answers.launchpad.net/sikuli/+question/678478 However if i can use as a import in my script could be much better! Thanks, Antonio -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #679028]: Export as jar built a corrupt file
Question #679028 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679028 Status: Answered => Solved ANTONIO CARLOS PAES NASCIMENTO confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #679028]: Export as jar built a corrupt file
Question #679028 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679028 ANTONIO CARLOS PAES NASCIMENTO posted a new comment: Do you know some workaround? Something like execute the created script by command line for example.. Thanks, -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Question #679028]: Export as jar built a corrupt file
New question #679028 on Sikuli: https://answers.launchpad.net/sikuli/+question/679028 Hi guys, I'm trying to export my script as a jar file to execute in other machines without sikulix installed, but I'm getting some error with the generated file, the message it's that: "Invalid or corrupted file" Someone alredy get this error? Thanks, Antonio -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based) --- workaround
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 ANTONIO CARLOS PAES NASCIMENTO confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 Status: Answered => Solved ANTONIO CARLOS PAES NASCIMENTO confirmed that the question is solved: Good one hahah Now it works, thanks RaiMan (: I'll close this question! -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 ANTONIO CARLOS PAES NASCIMENTO posted a new comment: Nice! It works, but now we've permission problems: [error] RunTimeIDE: fatal error: java.io.IOException: Cannot run program "C:\Users\BRX Retail\AppData\Local\Programs\Python\Python38-32": CreateProcess error=5, Acesso negado *error* java.io.IOException: Cannot run program "C:\Users\BRX Retail\AppData\Local\Programs\Python\Python38-32": CreateProcess error=5, Acesso negado*error* The strage is all this folders are with full permissions. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 ANTONIO CARLOS PAES NASCIMENTO posted a new comment: Thanks man, I found this question https://answers.launchpad.net/sikuli/+question/286612 and I think this solve my problem, however when I run rour example I got this errors in the message area from sikulix IDE: [error] Error caused by: Traceback (most recent call last): File "C:\Users\BRX Retail\Desktop\Testes_automatic\test)open_app.sikuli\test)open_app.py", line 4, in result = run(cmd) File "C:\Users\BRX Retail\AppData\Roaming\Sikulix\Lib\sikuli\Sikuli.py", line 555, in run return Sikulix.run(cmd) at java.util.Formatter.checkText(Unknown Source) at java.util.Formatter.parse(Unknown Source) at java.util.Formatter.format(Unknown Source) at java.util.Formatter.format(Unknown Source) at java.lang.String.format(Unknown Source) at org.sikuli.basics.Debug.log(Debug.java:726) at org.sikuli.basics.Debug.logx(Debug.java:691) at org.sikuli.script.RunTime.log(RunTime.java:97) at org.sikuli.script.RunTime.runcmd(RunTime.java:2952) at org.sikuli.script.Sikulix.run(Sikulix.java:550) at org.sikuli.script.Sikulix.run(Sikulix.java:546) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.D elegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) java.util.UnknownFormatConversionException: java.util.UnknownFormatConversionException: Conversion = '1' This is my script: python = r"C:\Users\BRX Retail\AppData\Local\Programs\Python\Python38-32\" pyscript = r"C:\Users\BRX Retail\Desktop\teste.py" cmd = "%s %s" % (python, pyscript) result = run(cmd) print(result) #teste.py import cx_Oracle # Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer. con = cx_Oracle.connect('user/passwd@host') #cursor = con.cursor() #cursor.execute(""" #SELECT * #FROM table #""") #res = cursor.fetchmany(numRows=10) print("BLABLA") You already see this? Thanks -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 ANTONIO CARLOS PAES NASCIMENTO posted a new comment: Hi RaiMan, First off all thanks for answering. And if I use another dev tool like Sublime and try to import sikulix inside that tool, or something in this line? Thanks. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Question #678478]: How to import cx_Oracle library into python SikuliX script
New question #678478 on Sikuli: https://answers.launchpad.net/sikuli/+question/678478 Hi guys, I'm trying to import cx_Oracle library into my python test script inside sikulix, however I'm getting this error: [error] script [ connect_and_print ] stopped with error at line --unknown-- [error] Error caused by: Traceback (most recent call last): File "C:\Users\BRX Retail\Desktop\Testes_automatic\connect_and_print.sikuli\connect_and_print.py", line 3, in import cx_Oracle ImportError: No module named cx_Oracle My imports are: import random import org.sikuli.script.SikulixForJython import cx_Oracle Can you guys help me? Thanks, Antonio -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp