Python not starting in "Python Script" node

I’m kindly asking you for advice on how to get the Python integration to run in Knime. When I want to execute a “Python Script” node, I get the following message in the console:
ERROR Python Script 0:1478 Execute failed: invalid syntax (<string>, line 3)

A “Python Script (Labs)” node will execute just fine. I will use those for now, but I would like to know what is causing the issues with the standard Python nodes.
I have re-created my conda environment, tried different Python versions (preferred: Python version 3.9), and re-installed the Knime platform. What could be the reason for this error, and what else could I try?

My Setup: Windows 10 Enterprise, Knime Platform 4.5.1, Miniconda 3

@warm123 welcome to the KNIME forum. Could you provide us with more details? Maybe an example or the specific Python code that is failing.

You may have noticed that there are some differences in the in and out syntax of KNIME Python nodes in standard and in Labs version:

https://docs.knime.com/latest/python_installation_guide/#usage-examples

So you might check if this is the case.

Differences might be also illustrated by these two examples. Maybe you check if those do work with your settings and check the code. Also KNIME and Python is still sometimes a complex setup, so you might further explore these links.

Standard nodes:

New Python nodes:

1 Like

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