← Back to team overview

sikuli-driver team mailing list archive

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

 

yes, a bug with the latest version.

** Changed in: sikuli
       Status: Opinion => In Progress

** Summary changed:

- [1.1.4] module not found with latest sikulixapi.jar
+ [1.1.4] running plain Jython from commandline: import problems

** Description changed:

+ ********************** problem
+ using:
+ import org.sikuli.script.SikulixForJython
+ from sikuli import *
+ import whatever
+ 
+ leads to:
+     import whatever
+ File "C:\Users\rmhde\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.GeneratedMethodAccessor10.invoke(Unknown Source)                                                                                                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)                                                                                                                  at java.lang.reflect.Method.invoke(Unknown Source)                                                                                                                          java.lang.NullPointerException: java.lang.NullPointerException
+ ---------------------------------------------------------------------------------
+  
  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)
+   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.

-- 
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] running plain Jython from commandline: import problems

Status in Sikuli:
  In Progress

Bug description:
  ********************** problem
  using:
  import org.sikuli.script.SikulixForJython
  from sikuli import *
  import whatever

  leads to:
      import whatever
  File "C:\Users\rmhde\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.GeneratedMethodAccessor10.invoke(Unknown Source)                                                                                                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)                                                                                                                  at java.lang.reflect.Method.invoke(Unknown Source)                                                                                                                          java.lang.NullPointerException: java.lang.NullPointerException
  ---------------------------------------------------------------------------------
   
  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