Hi,
I created custom python node and I have an issue with import classes from other files (located under same directory as the python file of the node).
knime not reloading the custom node with the imports , with the error: “Failed to parse Python node extension at path”.
thanks in advance,
“SyntaxError: invalid syntax match func[‘func’]:” match case works in python version 3.9 and higher - and should be valid.
“ERROR : Worker-1: Workflow Coach loader : : RepositoryManager : : : Category ‘python-nodes’ from plugin ‘org.knime.python3.nodes.testing’ could not be created in parent path ‘/testing/’.
java.lang.IllegalArgumentException: The segment ‘testing’ in path ‘testing/’ does not exist!”
If you have a look at step 4 of the tutorial, and check your created environment, you will probably see that you use an environment with Python 3.9.
Also in this step 4, you see that three modules are specified for the installation: 1) knime-extension, 2) knime-python-base, 3) Python.
1)knime-extension brings in all the necessary API files such that you can use code-completion in your editor, if the environment is activated there.
2)knime-python-base is a metapackage which brings in dependencies like pyarrow and pandas etc, which are necessary for interacting with the KNIME Analytics Platform. If you look at Files :: Anaconda.org you see that we provide knime-python-base up to Python 3.11.
3)Python lets you specify the version. as you can see in 2), the version range made available by knime-python-base is 3.8-3.11.
This answers your two questions: there is a way to make it work, you have to create (and use) an environment which uses Python>=3.10.
does that mean that there isn’t ListParameter? (lets say I want to get list of strings out of enum that you can choose from - it must required using stringParameter multipule time?
-another problem I got is getting error on loading the node - parameter missing for key “target_col”
after I click ok and continue - the node works fine.
the parameter target_col :
target_col = knext.ColumnParameter(
label=“Target column”,
description=“Select the Target column”,
port_index=0,
column_filter= None,
include_row_key=False,
include_none_column=True,
)
If you just recently added the target_col, that is desired: when reloading the node, it cannot have any settings for that parameter. It should not appear again. Does it?