Hi.
I’m learning Fiji scripting by Python(Jython).
A week ago, I updated my fiji app and after that the scripts I wrote don’t work right.
Here is the error message I got.
java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
at org.python.core.PyString.(PyString.java:57)
at org.python.core.PyString.(PyString.java:70)
at org.python.core.PyString.(PyString.java:74)
at org.python.core.Py.newString(Py.java:647)
at org.python.jsr223.PyScriptEngine.compileScript(PyScriptEngine.java:89)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.scijava.script.ScriptModule.run(ScriptModule.java:160)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I googled and found that if I use full width characters such as Chinese and Japanese the error shows up.
But in my case, I didn’t use those characters and the scripts work just right if I open a new script and copy paste the original code and run it.
This is the case with all the scripts I wrote so it’s not the problem of each code.
Environment
Mac OSX 10.14.6
Fiji imagej ver1.52p
Could anyone solve this problem?