knime / knimepy

Other
44 stars 15 forks source link

Raise a Warning when an input is still set to None #24

Closed applio closed 3 years ago

applio commented 3 years ago

The behavior out of locally-executed KNIME has changed over time when attempting to run a workflow expecting one or more inputs but no input is supplied (from Python or equivalently on the command-line to KNIME). Because the error message out of KNIME in these situations can be difficult to interpret, perhaps we should raise a Warning (but not an Exception) when execute() is called on a knime.Workflow but the default value of None is still set for one or more of the expected inputs.

Such warnings can be suppressed with a quick with-statement, whenever appropriate.

This would save users needing to parse the error log from KNIME and help quickly highlight a common potential reason for a failed execution.

applio commented 3 years ago

Adding detail to this: KNIME's Container Input (Table) node changed its behavior with the release of KNIME v4.2 so that if an input json file is specified on the command-line but it contains a JSON null, that node would no longer quietly fail over to using its previously-defined default data table (which was something the user could control through KNIME by priming the node with certain data) and would instead trigger a WARN message in KNIME's error log and not fail over to its default data.

In order to adjust to this new behavior in KNIME's Container Input (Table) node, it seems that when an input is still set to None we should change to no longer specify any input json file for this node (even one containing null); by not specifying any input for this node, we trigger the familiar behavior from the Container Input (Table) node where it fails over to its default data.

applio commented 3 years ago

Bug label added for broken tests due to new KNIME v4.2 behavior.