i have problem when i try to run my script

Asked by yazid amine

i have problem when i try to rur my script
script more than 2500 lignes
can some one help me pls

error message

[error] script [ resetbot+lvl ] stopped with error at line --unknown--
[error] Error caused by: java.lang.RuntimeException: Encountered too large method code in C:\Users\SAV\AppData\Local\Temp\Sikulix_1813560591\resetbot+lvl.sikuli\resetbot+lvl.py Please provide a CPython 2.7 bytecode file (.pyc) to proceed, e.g. run python -m py_compile C:\Users\SAV\AppData\Local\Temp\Sikulix_1813560591\resetbot+lvl.sikuli\resetbot+lvl.py and try again. Alternatively provide proper CPython 2.7 execute command via cpython_cmd property, e.g. call jython -J-Dcpython_cmd=python or if running pip on Jython: pip install --global-option="-J-Dcpython_cmd=python" <package>
at org.python.compiler.Module.loadPyBytecode(Module.java:838)
at org.python.compiler.Module.compile(Module.java:935)
at org.python.compiler.Module.compile(Module.java:701)
at org.python.compiler.LegacyCompiler$LazyLegacyBundle.ostream(LegacyCompiler.java:59)
at org.python.compiler.LegacyCompiler$LazyLegacyBundle.loadCode(LegacyCompiler.java:

43)
at org.python.core.CompilerFacade.compile(CompilerFacade.java:33)
at org.python.core.Py.compile_flags(Py.java:2171)
at org.python.core.Py.compile_flags(Py.java:2176)
at org.python.core.Py.compile_flags(Py.java:2186)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:527)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:286)
at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:206)
at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:175)
at org.sikuli.ide.SikuliIDE$ButtonRun$SubRun.run(SikuliIDE.java:2556)
at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException: java.lang.RuntimeException: Encountered too large method code in C:\Users\SAV\AppData\Local\Temp\Sikulix_1813560591\resetbot+lvl.sikuli\resetbot+lvl.py Please provide a CPython 2.7 bytecode file (.pyc) to proceed, e.g. run python -m py_compile C:\Users\SAV\AppData\Local\Temp\Sikulix_1813560591\resetbot+lvl.sikuli\resetbot+lvl.py

and try again. Alternatively provide proper CPython 2.7 execute command via cpython_cmd property, e.g. call jython -J-Dcpython_cmd=python or if running pip on Jython: pip install --global-option="-J-Dcpython_cmd=python" <package>

ty for all

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
yazid amine
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#3

SikuliX version?
recommended 1.1.4 (http://sikulix.com)

you have to split the script into parts and run the parts using the runscript feature:
https://sikulix-2014.readthedocs.io/en/latest/scripting.html#running-scripts-and-snippets-from-within-other-scripts-and-run-scripts-one-after-the-other

Revision history for this message
yazid amine (yamine19833) said :
#5

ty sir