"Python Source" Node: ERROR Python Source Execute failed: fill value must be in categories

OK, I was able to create a VERY simple workflow, that does nothing but load the dataframe (from a pickle file), and demonstrates the “Python Source” node error. I had some version issues between the Anaconda environment I normally use in PyCharm, and the Python 3 environment KNIME creates, so I saved the pickle file using the Python 3 environment automatically created when configuring the Python Extension.

I’m providing the workflow, along with the dataframe (in the form of a pickle file) that works fine external to KNIME (e.g. PyCharm), but gets the category error from within KNIME.

Note: In order to include the datafile (file df_pickle) in the KNIME export, I had to place the file in the workflow group. UNFORTUNATELY, I do not know how to reference the data-file this way (normally, I use an absolute path on my hard-disk). THUS, for this example to work, you would need to fix the file reference in this line, in the only node in the workflow:

output_table = pd.read_pickle(“df_pickle”)

Sorry for having the file reference wrong in my example, but most of my KNIME work has been with SQL Server. Other than that, it should work fine with the python 3 anaconda environment automatically created by the latest Python Extension: except for what I believe to be a Python Source node “bug”.

Python Source Issue.knar (7.6 KB)

BTW, if someone can let me know how to correctly enter the path to file df_pickle in this example, I won’t have to embarrass myself again next time… :roll_eyes: