Getting ReferenceError "Commands" is not defined

Asked by towards eternity on 2019-12-01

I've downloaded both ide and jpython file.
Then run the sikulix.jar with "java -jar sikulix.jar" without error.
Now whatever I type to IDE and try to run, get the same message:

javax.script.ScriptException: ReferenceError: "Commands" is not defined in nashorn:mozilla_compat.js at line number 69

Can't find the exact error in google.

Can you help me?

Question information

Language:
English Edit question
Status:
Open
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-12-03
Last reply:
2019-12-03
RaiMan (raimund-hocke) said : #1

What system? What Java?
What version of SikuliX?
Where did you download from?
What is jpython file?

System macOS Mojave v10.14.6

Java -version:
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

Downloaded stable version from offical page

Jpython or Jruby needed for run the sikulix-2.0.1.jar

RaiMan (raimund-hocke) said : #4

according to the download page:

- put sikulix-2.0.1.jar and jython-standalone-2.7.1.jar in the same folder (jruby is only needed if you plan to script in ruby language)
- in the Finder just double-click sikulix-2.0.1.jar

the SikuliX IDE should startup

enter a line
print "Hello world"

and click the run button (or use cmd-r)

and in the message area you should see
Hello world

print("Hello world") works successfuly. But other commans
 like click(THE_SCREENSHOT_OF_AN_ITEM) gives same error.

RaiMan (raimund-hocke) said : #6

Did you really follow the steps mentioned in comment #4?

And please do exactly as mentioned:
I said
print "Hello world"

and not
print("Hello world")

We are talking about using Python scripting language.

In doubt delete everything you had before and start all over again.

look this 2 case. print "Hello world" gives syntax error.

https://imgur.com/gallery/zVRiFPr

RaiMan (raimund-hocke) said : #8

You are still running a script with Javascript.

Start a new tab (script) and if your installation is ok, then the script should use Python/Jython (status line bottom right).

You can force an empty tab to be Jython: right mouse on tab and then "set type"

If Jython is not selectable, then your setup is still not valid.

I put the jython file near the sikulix.jar.
when I double click the sikulix.jar, jython file disappeared (I think it will move to the root folder of sikulix.)

I start a new tab and try to print "Hello world" and got this error

https://imgur.com/gallery/eiIWCTt

Can you help with this problem?

Provide an answer of your own, or ask towards eternity for more information if necessary.

To post a message you must log in.