ERROR Rule Engine Execute failed: Error during deserialization


After modyfing my data table in the Python Script (Labs) node i get an “Execute failed: Error during deserialization” error on the subsequent node (I tested Rule Engine and CSV Writer).
Does anyone have a hint for this?


import knime_io as knio
import numpy as np
import pandas as pd

# Limit values
RO5 = {"MW":500, "CLogP":5, "HBA":10, "HBD":5}
RO3 = {"MW":300, "CLogP":3, "HBA":3, "HBD":3}
VEBER = {"nRotB":10, "TPSA":140, "SumHB":12}

def calculate_violations(df: pd.DataFrame, prop:dict):
    violations = np.zeros(df.shape[0]).astype(int)
    for key, value in prop.items():
        violations += list(map(int,(df[key] > value)))
    return violations.astype(int)

df = knio.input_tables[0].to_pandas()

# Create new columns for SumHB, Ro5, Ro3, Veber's Violations
df = df.assign(SumHB = lambda x: x.HBD + x.HBA)
df = df.assign(Ro5 = calculate_violations(df, RO5))
df = df.assign(Ro3 = calculate_violations(df, RO3))
df = df.assign(Vebers = calculate_violations(df, VEBER))

print(df.loc[:,["SumHB","Ro5", "Ro3", "Vebers"]])

# Output the modified DataTable to Knime.
knio.output_tables[0] = knio.write_table(df)



@Gianluca99 welcome to the KNIME forum. Could you check if you use the columnar storage by any chance?

Then you could try and use a domain calculator before you store ore use the rule engine. The you could start once with the clean option.

Also update knime to the latest version. Then you might create a small workflow that reproduces the error.

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