sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #51091
Re: [Bug 1821530] Re: [1.1.4] module not found with latest sikulixapi.jar
1. Installed jython
2. Installed requests
3. Installed python
4. Downloaded sikulixapi.jar
5. Set CLASSPATH env to sikulixapi.jar
6. Set PATH to python and jython
7. Powershell as admin
8. In powershell:
Jython .\test.py
In test.py:
import org.sikuli.script.SikulixForJython
from sikuli import *
Import requests
Then in the script I use requests.get(url, stream=True)
On Sun, Mar 24, 2019, 19:55 RaiMan <sikulix@xxxxxxxxxxx wrote:
> how do you run the script?
>
> run timme setup? Jython, SikuliX, ...
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1821530
>
> Title:
> [1.1.4] module not found with latest sikulixapi.jar
>
> Status in Sikuli:
> Opinion
>
> Bug description:
> I've used the latest sikulixapi.jar and got:
>
>
> Python 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
> [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_201
> Traceback (most recent call last):
> File ".\test.py", line 44, in <module>
> download(url=installer_url)
> File ".\test.py", line 31, in download
> r = requests.get(url, stream=True)
> File "D:\Users\user\jython27\Lib\site-packages\requests\api.py", line
> 75, in get
> return request('get', url, params=params, **kwargs)
> File "D:\Users\user\jython27\Lib\site-packages\requests\api.py", line
> 60, in request
> return session.request(method=method, url=url, **kwargs)
> File "D:\Users\user\jython27\Lib\site-packages\requests\sessions.py",
> line 519, in request
> prep = self.prepare_request(req)
> File "D:\Users\user\jython27\Lib\site-packages\requests\sessions.py",
> line 449, in prepare_request
> auth = get_netrc_auth(request.url)
> File "D:\Users\user\jython27\Lib\site-packages\requests\utils.py",
> line 172, in get_netrc_auth
> from netrc import netrc, NetrcParseError
> File "D:\Users\user\jython27\Lib\site-packages\requests\utils.py",
> line 172, in get_netrc_auth
> from netrc import netrc, NetrcParseError
> File
> "D:\Users\user\AppData\Roaming\Sikulix\Lib\sikuli\SikuliImporter.py", line
> 50, in find_module
> module_path = JH.get().findModule(module_name, package_path,
> sys.path)
> at java.io.File.<init>(Unknown Source)
> at
> org.sikuli.basics.FileManager.normalizeAbsolute(FileManager.java:889)
> at org.sikuli.script.ImagePath.setBundlePath(ImagePath.java:556)
> at org.sikuli.script.ImagePath.getBundlePath(ImagePath.java:590)
> at
> org.sikuli.script.runnerHelpers.JythonHelper.findModule(JythonHelper.java:530)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
>
> I do not get this with an older version.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sikuli/+bug/1821530/+subscriptions
>
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1821530
Title:
[1.1.4] module not found with latest sikulixapi.jar
Status in Sikuli:
Opinion
Bug description:
I've used the latest sikulixapi.jar and got:
Python 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_201
Traceback (most recent call last):
File ".\test.py", line 44, in <module>
download(url=installer_url)
File ".\test.py", line 31, in download
r = requests.get(url, stream=True)
File "D:\Users\user\jython27\Lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "D:\Users\user\jython27\Lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "D:\Users\user\jython27\Lib\site-packages\requests\sessions.py", line 519, in request
prep = self.prepare_request(req)
File "D:\Users\user\jython27\Lib\site-packages\requests\sessions.py", line 449, in prepare_request
auth = get_netrc_auth(request.url)
File "D:\Users\user\jython27\Lib\site-packages\requests\utils.py", line 172, in get_netrc_auth
from netrc import netrc, NetrcParseError
File "D:\Users\user\jython27\Lib\site-packages\requests\utils.py", line 172, in get_netrc_auth
from netrc import netrc, NetrcParseError
File "D:\Users\user\AppData\Roaming\Sikulix\Lib\sikuli\SikuliImporter.py", line 50, in find_module
module_path = JH.get().findModule(module_name, package_path, sys.path)
at java.io.File.<init>(Unknown Source)
at org.sikuli.basics.FileManager.normalizeAbsolute(FileManager.java:889)
at org.sikuli.script.ImagePath.setBundlePath(ImagePath.java:556)
at org.sikuli.script.ImagePath.getBundlePath(ImagePath.java:590)
at org.sikuli.script.runnerHelpers.JythonHelper.findModule(JythonHelper.java:530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
I do not get this with an older version.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1821530/+subscriptions
References