Python snippet failed since its last update

Dear Knime community,

Since I have updated the Python Snippet node, it failes even with:


It returns this error:

ERROR	 PythonSnippetNodeModel        	   File "/tmp/", line 136
ERROR	 PythonSnippetNodeModel        	     d = {k: d[k].values() for k in d} # convert to dict of lists (as used by the python snippet)
ERROR	 PythonSnippetNodeModel        	                             ^
ERROR	 PythonSnippetNodeModel        	 SyntaxError: invalid syntax
ERROR	 Python Snippet                	 Execute failed: No python output table found, check script output


The Knime Python Scripting extension version is

Anyone else has noticed this new error?

I hope it will be fixed quickly.



Dear Nicolas,

I am facing exactly the same issue.

In the case that there is no immediate fix, does anyone know how to roll back to a previous version of the node?


Jose Manuel


The python snippets work just fine here on several computers (though all Macs). The new version verifies whether pandas are installed or not and will either use those or use the old dictionary script. I am wondering whether you have several installations of python, some with some without pandas. The script might then find pandas, but KNIME uses andother instance not linked to the module and fail. Is that a possibility?



I am confused. I just uninstalled, reinstalled the Knime Python Scripting extension. It is the same version and it now works.

So Jose Manuel, maybe you should try this?


Hi folks,

I have the same problem on Red Hat Enterprise 6.6: pandas is installed and working. I tried unistalling and reinstalling and it didn't work for me.

is there any way to revert to the older node? 


thanks a lot



At the moment, I have no idea where this problem comes from.

To restore the old version (after uninstalling the new one):

I thought it would be possible to choose the old version by unchecking "show only the latest versions ...", but it does not show older versions.

Could you try whether it is possible to install the old version from the 2.9 update site?

I'm not sure if this will work...

do you have just a single python installation?

(type -a python)

which operating system do you use?


niederle, I did what you suggested and reverted to the old python nodes, which work fine, even though I never installed pandas in the first place.
Is it a new dependency?

I am working on Centos6.5 and have only one version of python installed (2.6.6) :
type -a python gives "python is /usr/bin/python".

I would prefer having the new nodes working, as they seem to accept non standard column types (SDF), but still now I can use my snippets again!

Thank you for the tip!

Jose Manuel

I could reproduce the error by switching to python 2.6.8 (Mac, no pandas installed).

It works fine with python 2.7.8 (Windows) even without pandas installed.

So, upgrading python to 2.7 might also help.

I will try to fix the bug with version 2.6

Hi all,

the bug was due to missing dictionary comprehension in python 2.6. I just comitted a fix.

Nevertheless updating to python 2.7 would probably be a good idea :)

Python 2.6 is the standard on CentOS 6.x which quite a few people are using. Therefore still supporting Python 2.6 isn't a bad idea (even if it's certainly a bit annoying from the developers perspective).

The bug was due to dict comprehension missing in python 2.6. I apologize for not having tested the code on 2.6. However I commited a fix earlier today and hope it gets merged soon. 



The bug should be fixed now. It will be available with the next release.

Thanks for reporting the issue!

Indeed, Python 2.6 is due to CentOS 6.x, but in my system, I can easily switch from this version to a newer. It is just I have a lot of old workflows I made with this old version of Python and I noticed somes errors when I switched to Python 3.x.

I will probably stop using Python 2.6 with Knime 2.10.

Nevertheless, thank you Niederle for the update.



Processing a table containing a SDF field with a python snippet node fails on a fresh install of Knime 2.12 on my Centos6x using python 2.6.

Is python 2.6 still supported in recent Knime releases (Knime 3.0 for instance) or should I go back to previous python snippet versions?

Jose Manuel


I just installed Knime 3.1 to see how new python snippets can handle my python 2.7.

I noticed that they don't seem to support multi-line either as input or as output (executed workflow attached):

ERROR     KNIME-Worker-3 Python Snippet     Execute failed: String value can't be null. 

Is there a way to fix this? For now when I want to use python on SDF within Knime, I replace all "\n" by "#" for python snippets input, then restore "\n" within the node to execute my commands (with RDKit), then replace again "\n" by "#" for output....

However, switching from multi-line to single line all the time does not look like a good idea... Any idea how to fix this? I can run the workflow without any problem with Knime 2.11.

Thank you for your help!
Jose Manuel

Additional informations:

OS: CentOS 6.7 (Final)
python2.7 installed with anaconda, pandas and protobuf installed
When I start Knime, I get the following messages in terminal:

[josemanuel@desktop knime-full_3.1.0]$./knime
CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
WARN      KNIME-Worker-1 TipsAndNewsInjector     Could not modify intro page: Read timed out
---Registering Weka Editors---
### Excluding compile: javax.swing.text.GlyphView::getBreakSpot