"TypeError: The "options" argument must be of type object. Received an instance of Array" in node-red-contrib-machine-learning

Hey dears,
I wanna experiment with the Machine Learning Nodes of @GabrieleMaurina. Copying the example flow I get an error:

""TypeError: The "options" argument must be of type object. Received an instance of Array""

The topic were already discussed in 2022 without a solution (here)

Is there any solution now?

I tried Version 1 and Version 2

Welcome to the forums @SaschaMuehl

The author of V2 hasn't updated in 5+ years (V1 +7 years), and both don't provide a way to raise issues - If I were you, I would move on, they both clearly don't maintain the Nodes.

2 Likes

Hi marcus,
thanks for your reply and welcoming words.

Isn't there a way to mark the nodes as "does not work anymore"?

Hints for creating Machine Learning Models (based on tabular data such as sensor data over time) are more than welcome. I want to classify machine modes (program A, program B...) based on the power consumption.

You can give it one star on the node-red flows site.

I believe there is consideration going on about how to remove obsolete nodes from the node-red catalogue.

1 Like

Looking around I found this solution and it seems to work:

in the file /utils/utils.js
you can replace this:
node.proc = spawn(pcmd, [node.file], ['pipe', 'pipe','pipe'])
with this:
node.proc = spawn(pcmd, [node.file], {stdio:['pipe', 'pipe','pipe']})

1 Like

I don't know what this change is doing but this worked well! Thank you @maxdam!