Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
geekay
New Member

R script error - The system cannot find the path specified

 

I have the latest PowerBI desktop loaded on Win2008R2.

PowerBI automatically and correctly detected the R folder location as : C:\Program Files\R\R-2.15.3

I have also made sure that the above R folder is in the PATH

 

I have a simple R script as below:

 

x<-1:11
hist(x)

 

The Error message  I get is:

 

Error Message:

R script error.
The system cannot find the path specified.


Stack Trace:

 

Invocation Stack Trace:

 

Error details
R script error.
The system cannot find the path specified.


Stack trace
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: R script error.
The system cannot find the path specified.
---> Microsoft.PowerBI.Radio.RScriptRuntimeException: R script error.
The system cannot find the path specified.

at Microsoft.PowerBI.Radio.RScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(String script, String inputVariableName, IDataReader dataReader, Nullable`1 viewportWidthPx, Nullable`1 viewportHeightPx)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(String script, String inputVariableName, IDataReader dataReader, Nullable`1 viewportWidthPx, Nullable`1 viewportHeightPx)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.Run(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDataShapeResult(QueryCommand transformCommand, String dataShapeId, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteDataQuery(IQueryResultDataWriter queryResultDataWriter, DataShapeGenerationContext dsqGenContext, DataQuery query, ServiceErrorStatusCode& serviceErrorStatusCode)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, ExecuteSemanticQueryRequest request, IConceptualSchema conceptualSchema)

Activity ID
b832ed01-aa73-ce0e-b460-9ec759b33f9e

Time
Fri Dec 25 22:55:54 PST 2015

Version
2.30.4246.281 (PBIDesktop)

 

1 REPLY 1
Avi_Sander
Microsoft Employee
Microsoft Employee

Hi Geekay -

    Can you try the following workaround http://community.powerbi.com/t5/Integrations-with-Files-and/R-script-unable-to-connect/m-p/12954/hig... .

I suspect this has to do with the location of the output data PBI uses for R.

 

Let us know if this works,

 

Thanks, Avi Sander (MS).

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.