Closed DavidPerezIngeniero closed 4 years ago
please confirm:
apparently the script runs into an error and the problem is with the error reporting.
if 1. is true: switch off the logging callback and run the script from commandline:
java -jar
... hopefully this shows more details about the possible problem
You've guessed, I capture all logging output, by using Debug.setLoggerNoPrefix()
. It used to work with SikuliX 1.1.4 SNAPSHOT.
Thanks RaiMan.
I've disabled custom logging and here is now the ouput:
[error] java.lang.NoSuchMethodError ( java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector; )
Exception in thread "Thread-14" java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags =
at java.util.Formatter$FormatSpecifier.failMismatch(Formatter.java:4298)
at java.util.Formatter$FormatSpecifier.checkBadFlags(Formatter.java:2997)
at java.util.Formatter$FormatSpecifier.checkGeneral(Formatter.java:2955)[ABM_puntoMapa ]
at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2725)
at java.util.Formatter.parse(Formatter.java:2560)
at java.util.Formatter.format(Formatter.java:2501)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at org.sikuli.basics.Debug.log(Debug.java:848)
at org.sikuli.basics.Debug.error(Debug.java:683)
at org.sikuli.script.runnerSupport.JythonSupport.findErrorSource(JythonSupport.java:896)
at org.sikuli.script.runners.JythonRunner.doRunScript(JythonRunner.java:179)
at org.sikuli.script.runners.AbstractScriptRunner.lambda$runScript$0(AbstractScriptRunner.java:173)
at org.sikuli.script.runners.AbstractScriptRunner$1.run(AbstractScriptRunner.java:3
Debug.error("--- Traceback --- error source first\n" + "line: module ( function ) statement \n" + errorTrace
+ "[error] --- Traceback --- end --------------")
Maybe errorTrace
contains some "%" character.
Maybe errorTrace contains some "%" character.
Might very well be. The log functions take a format string and allow to pass an argument list for string interpolation. What you can do is to escape the %
using %%
.
@RaiMan
It would probably be worth not to use the String.format()
method in case of null or empty args. When no args are given one obviously do not want to do the string interpolation and might rather just log an arbitrary String (which might contain %
). Would be more robust IMHO.
Should be fixed with PR #263 .
I think this is a good idea.
Yes, me too ;-)
After trying Sikulix 2.0.1 I see this error:
Running with Java 1.8.0.222, Linux 64 bits