How to return an empty table by knext.Table.from_pandas?

Dear community members,

I am creating my python node using knext API. My node has two output tables, one for successfully calculated results and another one for failed rows. I use knext.Table.from_pandas to convert and return these tables. The problem is that if there are records in both tables everything is ok. But if one table is empty I have:

ERROR KNIME-Worker-3-Off-target 3:12 Node Execute failed: The first column must contain unique row identifiers of type ‘string’ org.knime.python3.nodes.PythonNodeRuntimeException: The first column must contain unique row identifiers of type ‘string’
at org.knime.python3.nodes.CloseablePythonNodeProxy$FailureState.throwIfFailure(
at org.knime.python3.nodes.CloseablePythonNodeProxy.execute(
at org.knime.python3.nodes.DelegatingNodeModel.lambda$4(
at org.knime.python3.nodes.DelegatingNodeModel.runWithProxy(
at org.knime.python3.nodes.DelegatingNodeModel.execute(
at org.knime.core.node.NodeModel.executeModel(
at org.knime.core.node.Node.invokeFullyNodeModelExecute(
at org.knime.core.node.Node.execute(

Hi pirotex,

thanks for bringing this to our attention. Right now this is not possible. We are working on a fix.
If you have any further questions, please don’t hesitate to ask!

Best regards

1 Like