TypeError: The python type <class 'rdkit.Chem.rdchem.Mol'> is not compatible with any registered Python value factory.

Hi,

I am an author of a knime Python node. We have been using this node in our laboratory for a while without issues, but, having been installed on a Mac with an intel processor we have got an error.
The code for the node is (GitHub - sergsb/KNIME-standardizer)

File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/at.ac.univie.pharminfo.univiestand_0.1.1.202306071257/src/main/python/univiestand_extension.py”, line 127, in configure
input_schema = input_schema.append(knext.Column(Chem.rdchem.Mol, “Standardized Molecules (UNIVIE)”))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3_4.7.3.v202305081333/src/main/python/knime/api/schema.py”, line 597, in init
raise TypeError(
TypeError: (“Could not create column with type <class ‘rdkit.Chem.rdchem.Mol’>, please use a supported column type”, TypeError("\n Could not find registered KNIME extension type for Python logical type <class ‘rdkit.Chem.rdchem.Mol’>. \n Call knime.api.schema.LogicalType.supported_value_types() to get a list of supported types and use one of these.\n ", TypeError(“The python type <class ‘rdkit.Chem.rdchem.Mol’> is not compatible with any registered Python value factory.”)))

2024-03-04 07:54:19,657 : ERROR : main : : Node : Standardizer : 4:4 : Configure failed (PythonNodeRuntimeException): (“Could not create column with type <class ‘rdkit.Chem.rdchem.Mol’>, please use a supported column type”, TypeError("\n Could not find registered KNIME extension type for Python logical type <class ‘rdkit.Chem.rdchem.Mol’>. \n Call knime.api.schema.LogicalType.supported_value_types() to get a list of supported types and use one of these.\n “, TypeError(“The python type <class ‘rdkit.Chem.rdchem.Mol’> is not compatible with any registered Python value factory.”)))
org.knime.python3.nodes.PythonNodeRuntimeException: (“Could not create column with type <class ‘rdkit.Chem.rdchem.Mol’>, please use a supported column type”, TypeError(”\n Could not find registered KNIME extension type for Python logical type <class ‘rdkit.Chem.rdchem.Mol’>. \n Call knime.api.schema.LogicalType.supported_value_types() to get a list of supported types and use one of these.\n ", TypeError(“The python type <class ‘rdkit.Chem.rdchem.Mol’> is not compatible with any registered Python value factory.”)))
at org.knime.python3.nodes.CloseablePythonNodeProxy$FailureState.throwIfFailure(CloseablePythonNodeProxy.java:475)
at org.knime.python3.nodes.CloseablePythonNodeProxy.configure(CloseablePythonNodeProxy.java:402)
at org.knime.python3.nodes.DelegatingNodeModel.lambda$2(DelegatingNodeModel.java:130)
at org.knime.python3.nodes.DelegatingNodeModel.runWithProxy(DelegatingNodeModel.java:204)
at org.knime.python3.nodes.DelegatingNodeModel.configure(DelegatingNodeModel.java:128)
at org.knime.core.node.NodeModel.configureModel(NodeModel.java:1078)
at org.knime.core.node.Node.invokeNodeModelConfigure(Node.java:2007)
at org.knime.core.node.Node.configure(Node.java:1943)
at org.knime.core.node.workflow.NativeNodeContainer.performConfigure(NativeNodeContainer.java:566)
at org.knime.core.node.workflow.SingleNodeContainer.callNodeConfigure(SingleNodeContainer.java:315)
at org.knime.core.node.workflow.SingleNodeContainer.configure(SingleNodeContainer.java:200)
at org.knime.core.node.workflow.WorkflowManager.configureSingleNodeContainer(WorkflowManager.java:6540)
at org.knime.core.node.workflow.WorkflowManager.configureNodeAndPortSuccessors(WorkflowManager.java:6699)
at org.knime.core.node.workflow.WorkflowManager.configureNodeAndSuccessors(WorkflowManager.java:6642)
at org.knime.core.node.workflow.WorkflowManager.resetAndConfigureNodeAndSuccessors(WorkflowManager.java:5321)
at org.knime.core.node.workflow.WorkflowManager.resetAndConfigureNode(WorkflowManager.java:5242)
at org.knime.core.node.workflow.WorkflowManager.addConnection(WorkflowManager.java:1309)
at org.knime.core.node.workflow.WorkflowManager.addConnection(WorkflowManager.java:1225)
at org.knime.core.ui.wrapper.WorkflowManagerWrapper.addConnection(WorkflowManagerWrapper.java:223)
at org.knime.workbench.editor2.commands.CreateConnectionCommand.lambda$2(CreateConnectionCommand.java:404)
at org.knime.workbench.ui.async.AsyncUtil.wfmAsyncSwitchRethrow(AsyncUtil.java:200)
at org.knime.workbench.editor2.commands.CreateConnectionCommand.createConnection(CreateConnectionCommand.java:404)
at org.knime.workbench.editor2.commands.CreateConnectionCommand.execute(CreateConnectionCommand.java:331)
at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:228)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at org.eclipse.gef.tools.AbstractConnectionCreationTool.handleCreateConnection(AbstractConnectionCreationTool.java:256)
at org.eclipse.gef.tools.ConnectionDragCreationTool.handleButtonUp(ConnectionDragCreationTool.java:63)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:574)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:224)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4604)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1325)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4390)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3966)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:191)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
2024-03-04 07:54:35,112 : ERROR : main : : CloseablePythonNodeProxyFactory : Standardizer : 4:4 : py4j.clientserver:There was an exception while executing the Python Proxy on the Python Side.
Traceback (most recent call last):
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3_4.7.3.v202305081333/src/main/python/knime/api/schema.py”, line 501, in logical
bundle = kt.get_value_factory_bundle_for_python_type(value_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3_4.7.3.v202305081333/src/main/python/knime/api/types.py”, line 328, in get_value_factory_bundle_for_python_type
raise TypeError(
TypeError: The python type <class ‘rdkit.Chem.rdchem.Mol’> is not compatible with any registered Python value factory.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/at.ac.univie.pharminfo.univiestand.channel.bin.macosx.x86_64_0.1.1.202306071257/env/lib/python3.11/site-packages/py4j/clientserver.py”, line 617, in _call_proxy
return_value = getattr(self.pool[obj_id], method)(*params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/_node_backend_launcher.py”, line 361, in getDialogRepresentation
“schema”: kp.extract_schema(self._node, extension_version, inputs),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/knime/extension/parameter.py”, line 163, in extract_schema
“properties”: {“model”: _extract_schema(obj, extension_version, specs)},
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/knime/extension/parameter.py”, line 171, in _extract_schema
properties[name] = param_obj._extract_schema(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/knime/extension/parameter.py”, line 1336, in _extract_schema
properties[name] = param_obj._extract_schema(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/knime/extension/parameter.py”, line 878, in _extract_schema
values = _filter_columns(specs, self._port_index, self._column_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/knime/extension/parameter.py”, line 965, in _filter_columns
filtered = [_const(column.name) for column in spec if column_filter(column)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.3.v202305081333/src/main/python/knime/extension/parameter.py”, line 965, in
filtered = [_const(column.name) for column in spec if column_filter(column)]
^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/at.ac.univie.pharminfo.univiestand_0.1.1.202306071257/src/main/python/univiestand_extension.py”, line 15, in is_mol
return column.ktype == knext.logical(Chem.Mol)
^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3_4.7.3.v202305081333/src/main/python/knime/api/schema.py”, line 511, in logical
raise TypeError(
TypeError: ("\n Could not find registered KNIME extension type for Python logical type <class ‘rdkit.Chem.rdchem.Mol’>. \n Call knime.api.schema.LogicalType.supported_value_types() to get a list of supported types and use one of these.\n ", TypeError(“The python type <class ‘rdkit.Chem.rdchem.Mol’> is not compatible with any registered Python value factory.”))
2024-03-04 07:54:35,495 : ERROR : main : : CEFNodeView : : : TypeError: Cannot read properties of undefined (reading ‘schema’) (source: http://org.knime.js.pagebuilder/org/knime/core/knime-pagebuilder2-ap.js; line: 7)
2024-03-04 07:57:40,445 : WARN : main : : Node : Sorter : 3:3 : No selected columns to sort
2024-03-04 08:00:40,049 : WARN : main : : CloseablePythonNodeProxy : Standardizer : 3:4 : Traceback (most recent call last):
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3_4.7.3.v202305081333/src/main/python/knime/api/schema.py”, line 501, in logical
bundle = kt.get_value_factory_bundle_for_python_type(value_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/KNIME 4.7.7.app/Contents/Eclipse/plugins/org.knime.python3_4.7.3.v202305081333/src/main/python/knime/api/types.py”, line 328, in get_value_factory_bundle_for_python_type
raise TypeError(
TypeError: The python type <class ‘rdkit.Chem.rdchem.Mol’> is not compatible with any registered Python value factory.
What can be the reason for this error?

It looks like the KNIME RDKit Extension is not installed in your KNIME instance, is that possible?

1 Like

Yes, that is possible, but as far I can understand, every KNIME extension builds its own environment with all libraries needed inside. So, it is not clear to me, why it does not use the internal RDKit?

That’s true, but looking at KNIME-standardizer/src/knime.yml at main · sergsb/KNIME-standardizer · GitHub it seems you only added a dependency to the KNIME Chemistry types – which are not equal to RDKit (yeah… the naming is not optimal I guess). You need to add a dependency to org.rdkit.knime.feature. Could you try that?

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