← Back to team overview

sikuli-driver team mailing list archive

Re: [Bug 1821530] Re: module not found with latest sikulixapi.jar

 

Hi,

You are correct, worth mentioning that I am on Windows 10 and hence am
using powershell as admin to run the script.

I think the issue is with
from sikuli import *
and not with the import of the requests package.

On Sun, Mar 24, 2019, 18:55 RaiMan <sikulix@xxxxxxxxxxx wrote:

> What exactly is your runtime setup?
>
> You seem to work with Jython and sikulixapi.jar on classpath.
>
>
> ** Changed in: sikuli
>        Status: New => Opinion
>
> ** Changed in: sikuli
>    Importance: Undecided => Medium
>
> ** Changed in: sikuli
>      Assignee: (unassigned) => RaiMan (raimund-hocke)
>
> ** Changed in: sikuli
>     Milestone: None => 1.1.4
>
> ** Summary changed:
>
> - module not found with latest sikulixapi.jar
> + [1.1.4] module not found with latest sikulixapi.jar
>
> --
> 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