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(CloseablePythonNodeProxy.java:436)
at org.knime.python3.nodes.CloseablePythonNodeProxy.execute(CloseablePythonNodeProxy.java:286)
at org.knime.python3.nodes.DelegatingNodeModel.lambda$4(DelegatingNodeModel.java:139)
at org.knime.python3.nodes.DelegatingNodeModel.runWithProxy(DelegatingNodeModel.java:185)
at org.knime.python3.nodes.DelegatingNodeModel.execute(DelegatingNodeModel.java:137)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:549)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1267)
at org.knime.core.node.Node.execute(Node.java:1041)

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
Steffen

1 Like