R Snippet Error on Mac

Hi! This is my fist time writing on the forum and i’m quite new to Knime.

I’m having some issues with some R Nodes, some work fine and some give me this error:

"Execute failed: R evaluation failed.: “knime.tmp.ret<-NULL;printError<-function(e)
message(paste(‘Error:’,conditionMessage(e)));for(exp in tryCatch(parse(text=knime.tmp.script),error=printError)){tryCatch(knime.tmp.ret<-withVisible(eval(exp)),error=printError)
if(!is.null(knime.tmp.ret)) {if(knime.tmp.ret$visible) tryCatch(print(knime.tmp.ret$value),error=printError)}};rm(knime.tmp.script,exp,printError);knime.tmp.ret$value”

when i evaluate the script within the node i get no errors, however i’m not able to execute the node.
I think the problem is Mac related, since i tried to run the workflow on a Windows and it works. I read multiple entires in the forum with similar problems and tried to fix it by updating RServe, downloading all the suggested support programs like Xcode, Xquarz, Fortran, … but nothing seems to solve the problem.

My MacOS is Big Sur 11.2.3
Knime 4.5.1
R 4.1.2
RServe 1.8-10

Thank you

@erimacca welcome to the KNIME forum. Unfortunately I have the same issue especially when using the H2O.ai R package. As workaround I use the community R nodes where I would have to manually start the Rserve in a Studio session like here:

@Iris, @ScottF maybe you could have a look. It does not always occur. The R snippets in these meta nodes with h2o would not work.

Hi @erimacca, could you post your knime workflow file to this chat so we can see if we can reproduce your error on our own macs? Thank you! If you have sensitive information, please use a table creator node as input with fake data that replicates what you want to do.

1 Like

@mlauber71, yes I can reproduce this won’t work on a mac as well. I wonder if the OP is also trying to do something with h2o?

1 Like

@victor_palacios It used to work on a Mac with earlier versions of KNIME. H2O.ai would start its own process in the background and it does work with using the R community nodes (regression example, classification example), so it seems to be a ‘communication’ problem between R and KNIME.

We had such a thing with KNIME and Python where the progress bar would not work between KNIME and Python and H2O.ai so the solution was to turn it off:

Also recently there was some heavy editing going on on the Windows side of the R Snippets, so I wonder if something went wrong with the communication between KNIME and the R snippets on the Mac side also:

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