Hi, Dear KNIMEer,
I have dig the forum, find nothing related. And I also check the R install doc
I use KNIME 4.4.1 on Mac, R extension is also the latest. I use latest miniconda to install R. And install package like this: conda create -n r_knime -c conda-forge r-essentials r-base r-rserve r-cairo
. So the packages version are almost latest, I believe.
In KNIME, R Snippet
、Table to R
nodes work, so I believe the rserve
related thing is ok.
After that, I suspect the problem is about xquartz
, but when I try R in cmd line, it works:
cars <- c(1, 3, 6, 4, 9)
plot(cars)
Here is the knime.log:
2021-10-11 23:44:55,319 : ERROR : KNIME-Worker-43-R View (Table) 0:3 : : Node : R View (Table) : 0:3 : Execute failed: R evaluation failed.: "knime.tmp.ret<-NULL;printError<-function(e) message(paste('Error:',conditionMessage(e)));for(exp in tryCatch(parse(text=knime.t
mp.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"
org.knime.r.controller.IRController$RException: 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(e
xp)),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"
at org.knime.r.controller.RController.monitoredEval(RController.java:406)
at org.knime.r.controller.ConsoleLikeRExecutor.executeIgnoreResult(ConsoleLikeRExecutor.java:247)
at org.knime.r.RSnippetNodeModel.runRScript(RSnippetNodeModel.java:294)
at org.knime.r.RSnippetNodeModel.executeSnippet(RSnippetNodeModel.java:244)
at org.knime.r.RSnippetNodeModel.executeSnippet(RSnippetNodeModel.java:208)
at org.knime.r.RSnippetNodeModel.executeInternal(RSnippetNodeModel.java:166)
at org.knime.r.RSnippetNodeModel.execute(RSnippetNodeModel.java:154)
at org.knime.r.RViewNodeModel.execute(RViewNodeModel.java:108)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:556)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1259)
at org.knime.core.node.Node.execute(Node.java:1039)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:365)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:219)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: org.knime.r.controller.IRController$RException: 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"
at org.knime.r.controller.RController.eval(RController.java:395)
at org.knime.r.controller.RController$MonitoredEval.lambda$0(RController.java:1427)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadUtils$3.runWithContext(ThreadUtils.java:523)
at org.knime.core.util.ThreadUtils$ThreadWithContext.run(ThreadUtils.java:338)
Caused by: org.rosuda.REngine.Rserve.RserveException: voidEval failed
at org.rosuda.REngine.Rserve.RConnection.voidEval(RConnection.java:182)
at org.knime.r.controller.RController.eval(RController.java:390)
... 4 more
2021-10-11 23:44:56,505 : ERROR : KNIME-Worker-47-R View (Workspace) 0:4 : : Node : R View (Workspace) : 0:4 : 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"
org.knime.r.controller.IRController$RException: 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"
at org.knime.r.controller.RController.monitoredEval(RController.java:406)
at org.knime.r.controller.ConsoleLikeRExecutor.executeIgnoreResult(ConsoleLikeRExecutor.java:247)
at org.knime.r.RSnippetNodeModel.runRScript(RSnippetNodeModel.java:294)
at org.knime.r.RSnippetNodeModel.executeSnippet(RSnippetNodeModel.java:244)
at org.knime.r.RSnippetNodeModel.executeSnippet(RSnippetNodeModel.java:208)
at org.knime.r.RSnippetNodeModel.executeInternal(RSnippetNodeModel.java:166)
at org.knime.r.RSnippetNodeModel.execute(RSnippetNodeModel.java:154)
at org.knime.r.RViewNodeModel.execute(RViewNodeModel.java:108)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:556)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1259)
at org.knime.core.node.Node.execute(Node.java:1039)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:365)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:219)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: org.knime.r.controller.IRController$RException: 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<-withVis
ible(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"
at org.knime.r.controller.RController.eval(RController.java:395)
at org.knime.r.controller.RController$MonitoredEval.lambda$0(RController.java:1427)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadUtils$3.runWithContext(ThreadUtils.java:523)
at org.knime.core.util.ThreadUtils$ThreadWithContext.run(ThreadUtils.java:338)
Caused by: org.rosuda.REngine.Rserve.RserveException: voidEval failed
at org.rosuda.REngine.Rserve.RConnection.voidEval(RConnection.java:182)
at org.knime.r.controller.RController.eval(RController.java:390)
... 4 more
I suspect there is a bug, but I don’t have the ability to dig more.
Any suggestion?
Thanks!
I use Conda Environment Propagation
node to handle the environment, here is the workflow:
knime_r.knwf (762.9 KB)