Re: [Sikuli-driver] [Question #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-15 Thread RaiMan
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Status: Open => Answered

RaiMan proposed the following answer:
I could not check, wether requests can be used with the SikuliX Jython
interpreter (not possible if its uses C-based stuff from Python).

In any case, you have to take care, that the folder where pip installs
modules is on SikuliX's sys.path

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-15 Thread Guillermo
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Status: Answered => Open

Guillermo is still having a problem:
Apologies, I meant pip!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-15 Thread RaiMan
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Status: Open => Answered

RaiMan proposed the following answer:
npm means it is some javascript stuff, which surely cannot be imported
into Python scripts.

So IMHO this error has no solution.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-15 Thread Guillermo
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Status: Needs information => Open

Guillermo gave more information on the question:
It is a module that I install by `npm install requests`. 
I don't know if it is in sys.path - where would I check that?  :/

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-15 Thread RaiMan
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Status: Open => Needs information

RaiMan requested more information:
where is the "external" module request?

Can it be found on sys.path?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-14 Thread Guillermo
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Description changed to:
I have a structure of multi-sikuli-modules set up, with an "API" module that 
makes use of an external module ( 'requests'), i.e.:
 - test1.sikuli
 - test2.sikuli
 - API.sikuli -> tools.py has `import requests` 

I also have set up a, so to say, entry point, "framework.sikuli", that 
sequentially loads my modules and then launches them:
```
test_modules = [
r"API.sikuli",
r"test1.sikuli",
r"test2.sikuli"]

for module in test_modules:
 if not module in sys.path:
 sys.path.append(module)
module = module.replace(".sikuli", "")
print("Loading Module %s " % module)
module_obj = __import__(module)
globals()[module] = module_obj
```

If I remove the "API.sikuli" from test_modules array, when I run the 
framework.sikuli it fails afterwards (because test1 and test2 need the API), 
but having it there I get this error:
Loading Module API 
[error] script [ test_framework ] stopped with error in line 220
[error] ImportError ( !!WHILE IMPORTING!! No module named requests )
[error] --- Traceback --- error source first
line: module ( function ) statement 
5: API (   ) import requests
220: main (   ) module_obj = __import__(module)
[error] --- Traceback --- end --


What am I doing wrong?

I'm running Sikulix IDE 2.0.5, for what it's worth.

Thank you in advance

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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 #697968]: Unable to import module Requests on Sikulix IDE 2.0.5

2021-07-13 Thread Guillermo
Question #697968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697968

Description changed to:
I have a structure of multi-sikuli-modules set up, with an "API" module that 
makes use of an external module ( 'requests'), i.e.:
 - test1.sikuli
 - test2.sikuli
 - API.sikuli -> tools.py has `import requests` 

I also have set up a, so to say, entry point, "framework.sikuli", that 
sequentially loads my modules and then launches them:
```
test_modules = [
r"../API.sikuli",
r"../test1.sikuli",
r"../test2.sikuli"]

for module in test_modules:
 if not module in sys.path:
 sys.path.append(module)
module = path_leaf(module).replace(".sikuli", "")
print("Loading Module %s " % module)
module_obj = __import__(module)
globals()[module] = module_obj
```

If I remove the "API.sikuli" from test_modules array, when I run the 
framework.sikuli it fails afterwards (because test1 and test2 need the API), 
but having it there I get this error:
Loading Module API 
[error] script [ test_framework ] stopped with error in line 220
[error] ImportError ( !!WHILE IMPORTING!! No module named requests )
[error] --- Traceback --- error source first
line: module ( function ) statement 
5: API (   ) import requests
220: main (   ) module_obj = __import__(module)
[error] --- Traceback --- end --


What am I doing wrong?

I'm running Sikulix IDE 2.0.5, for what it's worth.

Thank you in advance

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
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