AttributeError NoneType object has no attribute 'to_arrow_table'

Hello, when I run the Python Script node I get this message: AttributeError: 'NoneType' object has no attribute 'to_arrow_table' ; however, I’m not sure what is the section of the code that triggers this message. For reference, the code runs accordingly if I execute it in Jupyter Notebook or Pycharm.

I recently updated KNIME to the latest version. I don’t remember what version I had before, but it’s been more than a year I believe since the last version installed.

Will appreciate any help provided. Regards.

@sirabelk3 I think you should make sure you have the latest version of the KNIME Python integration installed or a working Python installation of your own.

Also you should check what type of data your code would produce. If you want to bring data back from Python to KNIME you would have to have an Arrow data table. Often you would have a Pandas data frame that you would then convert to Arrow.

Maybe check out these examples.

2 Likes

Sorry for the late reply, thanks for the info @mlauber71 I read the guides to set up arrow tables and made the necessary adjustments to the code, fixing possible invalid values, etc , now I’m facing another issue, When I run this code in Python Script, it says Execution successful, but I’m unable to click on Execute on the KNIME script node, it’s disabled.


image

I printed both combined_data_frame and knio.output_tables[0] to make sure there weren’t invalid values. I tried converting using both knio.Table.from_pyarrow and knio.Table.from_pyarrow but the node still doesn’t execute.

@sirabelk3 your Python Script node does not have any data input. When you do not want to have input data you could remove the input port.

1 Like

So simple I missed that :sweat_smile: thank so you much, have a great day. Best regards.

1 Like

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