Python based Extension Development API: DoubleParameter can't display inf or nan
Hi,
the knext.DoubleParameter can’t display inf or NaN values, which is quite important f.i. for default values of filters or alike.
This
max_lim: knext.DoubleParameter = knext.DoubleParameter(
label=“Max. Limit”,
description=“Axis maximum limit”,
default_value=float("inf"), # same applies to np.inf, np.nan, ...
)results in the following error message being displayed when trying to configure the node:
Invalid node settings com.fasterxml.jackson.core.JsonParseException: Non-standard token ‘NaN’: enable JsonReadFeature.ALLOWNONNUMERIC_NUMBERS to allow at [Source: REDACTED (StreamReadFeature.INCLUDESOURCEIN_LOCATION disabled); line: 1, column: 262]
The fix seems to be fairly simple according to the error message. :slight_smile:
Best regards,
Johannes