Dear all,
I am attempting to write my first knime node using python and am running into an issue with a MoldeNotFoundError. Here is my python script so far:
import knime.extension as knext
@knext.node(name=“My Node”, node_type=knext.NodeType.MANIPULATOR, icon_path=“…/icons/icon.png”, category=“/”)
@knext.input_table(name=“Input Data”, description=“The data to process in my node”)
@knext.output_table(“Output Data”, “Result of processing in my node”)
class MyNode:
“”"Short description is in the first line next to the three double quotes here. It it displayed in overviews when a whole category in the node repository is selected.
Here begins the normal description: This node description will be displayed in KNIME Analytics Platform.
"""
def configure(self, config_context, input_table_schema):
return input_table_schema
def execute(self, exec_context, input_table):
return input_table
and here is the error output:
(my_python_env) PS C:\Users\AdamSemple> & C:/Users/AdamSemple/miniconda3/envs/my_python_env/python.exe “c:/Users/AdamSemple/OneDrive - Diaceutics/Documents/KNIME_PYTHON/myextension.py”
Traceback (most recent call last):
File “c:\Users\AdamSemple\OneDrive - Diaceutics\Documents\KNIME_PYTHON\myextension.py”, line 1, in
import knime.extension as knext
File “C:\Users\AdamSemple\miniconda3\envs\my_python_env\lib\site-packages\knime\api\table.py”, line 60, in
import knime.api.schema as ks
File “C:\Users\AdamSemple\miniconda3\envs\my_python_env\lib\site-packages\knime\api\schema.py”, line 60, in
import knime.api.types as kt
ModuleNotFoundError: No module named ‘knime.api.types’
(my_python_env) PS C:\Users\AdamSemple> & C:/Users/AdamSemple/miniconda3/envs/my_python_env/python.exe “c:/Users/AdamSemple/OneDrive - Diaceutics/Documents/KNIME_PYTHON/extension/myextension.py”
Traceback (most recent call last):
File “c:\Users\AdamSemple\OneDrive - Diaceutics\Documents\KNIME_PYTHON\extension\myextension.py”, line 1, in
import knime.extension as knext
File “C:\Users\AdamSemple\miniconda3\envs\my_python_env\lib\site-packages\knime\extension_init_.py”, line 51, in
import knime.api.table as _kt
File “C:\Users\AdamSemple\miniconda3\envs\my_python_env\lib\site-packages\knime\api\table.py”, line 60, in
import knime.api.schema as ks
File “C:\Users\AdamSemple\miniconda3\envs\my_python_env\lib\site-packages\knime\api\schema.py”, line 60, in
import knime.api.types as kt
ModuleNotFoundError: No module named ‘knime.api.types’
I would greatly appreciate any help with this you can offer!
Many thanks, Adam