sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #15093
Re: [Question #145923]: PIL not supported in Sikuli -- Crop, resize or modify a captured image
Question #145923 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/145923
Gaurav Kumar posted a new comment:
I am trying to execute this python script fro my sikuli ide but i am
getting following errors
popen("C:\Python27\python.exe C:\Users\gaurav\Desktop\test.py")
Could you please tell me how to execute a pyhton script from sikuli
iDE??
The script does the the following thing:
from PIL import Image
i = Image.open("C:\\Users\\gaurav\\Desktop\\nagala\\DSC_0051.JPG")
pixels = i.load() # this is not a list, nor is it list()'able
width, height = i.size
print height
print width
[error] Stopped
[error] An error occurs at line 1
[error] Error message: Traceback (most recent call last):
File "", line 1, in
File "C:\Users\gaurav\Downloads\sikuli-r930-win32\Sikuli-r930-win32\Sikuli-IDE\sikuli-script.jar\Lib\sikuli\__init__.py", line 3, in
File "C:\Users\gaurav\Downloads\sikuli-r930-win32\Sikuli-r930-win32\Sikuli-IDE\sikuli-script.jar\Lib\sikuli\Sikuli.py", line 26, in
java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.script.App
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.python.core.Py.loadAndInitClass(Py.java:895)
at org.python.core.Py.findClassInternal(Py.java:830)
at org.python.core.Py.findClassEx(Py.java:881)
at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:133)
at org.python.core.packagecache.PackageManager.findClass(PackageManager.java:28)
at org.python.core.packagecache.SysPackageManager.findClass(SysPackageMa
nager.java:122)
at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137)
at org.python.core.PyObject.__findattr__(PyObject.java:863)
at org.python.core.imp.import_name(imp.java:849)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importFromAs(imp.java:978)
at org.python.core.imp.importFrom(imp.java:954)
at sikuli.Sikuli$py.f$0(C:\Users\gaurav\Downloads\sikuli-r930-win32\Sikuli-r930-win32\Sikuli-IDE\sikuli-script.jar\Lib\sikuli\Sikuli.py:212)
at sikuli.Sikuli$py.call_function(C:\Users\gaurav\Downloads\sikuli-r930-win32\Sikuli-r930-win32\Sikuli-IDE\sikuli-script.jar\Lib\sikuli\Sikuli.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at
org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.PyModule.impAttr(PyModule.java:100)
at org.python.core.imp.import_next(imp.java:715)
at org.python.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importAll(imp.java:998)
at sikuli$py.f$0(C:\Users\gaurav\Downloads\sikuli-r930-win32\Sikuli-r930-win32\Sikuli-IDE\sikuli-script.
jar\Lib\sikuli\__init__.py:3)
at sikuli$py.call_function(C:\Users\gaurav\Downloads\sikuli-r930-win32\Sikuli-r930-win32\Sikuli-IDE\sikuli-script.jar\Lib\sikuli\__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.imp.import_next(imp.java:713)
at org.python.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1
220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importAll(imp.java:998)
at org.python.pycode._pyx44.f$0(:1)
at org.python.pycode._pyx44.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.Py.exec(Py.java:1305)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
at org.sikuli.script.ScriptRunner.runPython(ScriptRunner.java:64)
at org.sikuli.ide.SikuliIDE$ButtonRun.runPython(SikuliIDE.java:1574)
at org.sikuli.ide.SikuliIDE$ButtonRun$1.run(SikuliIDE.java:1679)
java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: Could
not initialize class org.sikuli.script.App
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.