JPython Script 1:1

I'm new to Knime and JPython. I'm using the JPython Script 1:1 node to add a column to a table. I'm using the script below:

iterator = inData0.iterator()
while iterator.hasNext():
row =
newStringCell = StringCell("some string")
newRow = AppendedColumnRow(row, newStringCell)

In the StringOutput dialog I've added an Output Column of type 'String'

I get the following error in the console:

ERROR PythonScriptNodeModel
ERROR JPython Script 1:1 Execute failed
ERROR JPython Script 1:1 Jython error (see console for error log).

I'm confused by the (see console for error log). Is there another console which I should be looking at for errors?

Can someone help me get this to work?

Thanks for the help,

Hello Lisa,

actually you are looking at the correct console, but you need to activate the DEBUG-level iin order to see the full error message exception that occurs when the Python node tries to parse your script.
In the Menu click on Window->Preferences->KNIME and set the Console Log Level to DEBUG. If you execute the node again you should have an error message like this:

java.lang.Exception: Jython error (see console for error log).
	at org.knime.ext.jython.PythonScriptNodeModel.execute(
	at org.knime.core.node.NodeModel.execute(
	at org.knime.core.node.GenericNodeModel.executeModel(
	at org.knime.core.node.Node.execute(
	at org.knime.core.node.workflow.SingleNodeContainer.executeNode(
	at org.knime.core.node.workflow.SingleNodeContainer.access$1(
	at org.knime.core.node.workflow.SingleNodeContainer$
	at org.knime.core.node.workflow.ThreadedJobExecutor$
Caused by: Traceback (innermost last):
  (no code object) at line 0
SyntaxError: ('invalid syntax', ('<>', 27, 1, 'row ='))
at org.python.core.parser.fixParseError(
at org.python.core.parser.parse(
at org.python.core.Py.compile_flags(
at org.python.core.Py.compile_flags(
at org.python.core.__builtin__.compile(
at org.knime.ext.jython.PythonScriptNodeModel.execute(

which telly sou that something went wrong in the line with

I am not very familiar with Python, but every statement that should be executed in a while- loop needs to be indented.
You also need to pass a DataCell-array to the second argument of the constructorof AppendedColumnRow by putting the StringCell into [] brackets.

The correct script should look like this:

iterator = inData0.iterator()
while iterator.hasNext():
	row =
	newStringCell = StringCell("some string")
	newRow = AppendedColumnRow(row, [newStringCell])

Best regards


Thanks Nicolas! Working fine now!

This post is old, but I have basically the same problem, the JPython Script 1:1 node fails, the message in the console says to "see console for error log", but unfortunately there is nor more information, even if the DEBUG mode is activated.


Could you, please, tell me what to do?