I have a strange problem. I am doing a KNIME 4.7 python extension. I use radio buttons in configure. If there is only one radio button, it works as expected, but the same code fails with two buttons.
class StereoOptions(knext.EnumParameterOptions):
KEEP = ("No Changes", "Do nothing with stereochemistry.")
REMOVE = ("Remove", "Remove stereochemistry at all.")
CLEAN = ("Clean", "Clean and fix stereochemistry.")
stereo = knext.EnumParameter(
"Stereochemistry processing",
"How to process stereochemistry.",
StereoOptions.KEEP.name,
StereoOptions,
)
class StereoOptions2(knext.EnumParameterOptions):
KEEP = ("No Changes", "Do nothing with stereochemistry.")
REMOVE = ("Remove", "Remove stereochemistry at all.")
CLEAN = ("Clean", "Clean and fix stereochemistry.")
stereo2 = knext.EnumParameter(
"Stereochemistry processing",
"How to process stereochemistry.",
StereoOptions2.KEEP.name,
StereoOptions2,
)
ValueError: The selection ‘None’ for parameter ‘Stereochemistry processing’ is not one of the available options: ‘KEEP’, ‘REMOVE’, ‘CLEAN’.