Hello, I am having a problem with kwatters Harry.py script. When I run it, this is the error that I get

ear.addListener("publishText", python.name, "heard");

Traceback (most recent call last):  File string, line 60, in moduleNameError: name python is not defined   at org.python.core.Py.NameError(Py.java:284)        at org.python.core.PyFrame.getname(PyFrame.java:257)              at org.python.pycode._pyx3.f$0(string:98) at org.python.pycode._pyx3.call_function(string)              at org.python.core.PyTableCode.call(PyTableCode.java:167)             at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1386)           at org.python.core.Py.exec(Py.java:1430)              at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:267)        at org.myrobotlab.service.Python$PIThread.run(Python.java:177)------

kwatters

8 years 5 months ago

How are you launching it?  Are you using the latest build?

"python" is a default service that launches when you run myrobotlab from the command line like the following:

> java -jar myrobotlab.jar 

It's an odd error that you're seeing, it seems to indicate that the python service wasn't started.

 

The only thing in the script that I see that might be an issue is the following:

You could replace the following line:

ear.addListener("publishText", python.name, "heard");

With:

ear.addListener("publishText", "python", "heard");

(Or just remove this line all together because it's only used for debugging speech recognition back in python land.)

I am using Eclipse Java Mars, I go into eclipse and press PF11

that will bring up the MRL menu I start the python service and then open the Harry.py

I am using the latest build of MRL GUI 2016.06.10

Hi BillC,  I saw you commented again, did my recommendation of commenting out that line work?  or did you try changing it to say "python" ?