Conditional options based on OS


I’m trying to have some options that are displayed or hidden depending on if and API is running or not. I have added an if statement and it works, but in the console I have the following warning:

Loading model settings failed: Parameter missing for key "variable_name"

If I define the variable out of the if statement, it complains about that hard links cannot be created. So here part of the code:

URI=knext.StringParameter("URI", URI_description, "localhost")
PORT=knext.StringParameter("PORT", PORT_description, "8080")

if system_name =="Linux" and local_API_running("http://localhost:8080/home") == "FALSE":
        variable_name=knext.StringParameter("Variable", variable_description, "name")

Any help will be appreciated.

The Loading model warning could also be just during development, because you changed the parameters. Does that one exist if using a fresh instance of your node?

Best regards

Hi @steffen_KNIME ,

You are right. Using fresh nodes solved the problem.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.