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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

R Script Visual error - Can't find R

Hi all,

I am unable to use the R Script visual in Power BI desktop, getting the 'Failed to retrieve error code string from System -> 317'. This seems to indicate PBI cannot find R, even though it is connected to the correct folder. 

 

As PBI does not support newer versions of R, this version has been extracted to a local folder (...\Documents\R-3.4.4) without administrative privalleges. R Studio can connect to it and run without problem. Running the PBI visual in R Studio (clicking the arrow icon) works without problem. Only base R functions are used.

Just wondering if there are any path or environment variables to be aware of? A newer version has been installed with admin privalleges to Program Files. Could that installation be interefering with how Power BI connects to R? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-shex-msft, thanks for replying. It was a good idea to move the folder around the computer, as the Documents folder was linked to OneDrive. After relocating R to C:\R\R-3.3.3 (also trying an older version), a new error presented, claiming permission was denied.

This might have become a similar problem to this, where antivirus software was preventing Power BI from accessing R. 


Edit, confirmed. After checking event logs in antivirus software, Rscript.exe was prevented from accessing the RScriptWrapper.R file as executing scripts are blocked in this organisation. 

Edit2: It actually works when published online!, including the usage of a version of ggplot2 incompatible with R~3.4.4. So clearly there's a difference in how R Script visuals process bewtween Power BI Desktop and Power BI service.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

Where are you storing the r script related to packages? Did these saved locally or hosted on the remote/shared server? Have you checked the current account and power bi client has enough permission to access and edit the specific folder/files with these contents?

Please share some more detailed information to help us clarify these:

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft, thanks for replying. It was a good idea to move the folder around the computer, as the Documents folder was linked to OneDrive. After relocating R to C:\R\R-3.3.3 (also trying an older version), a new error presented, claiming permission was denied.

This might have become a similar problem to this, where antivirus software was preventing Power BI from accessing R. 


Edit, confirmed. After checking event logs in antivirus software, Rscript.exe was prevented from accessing the RScriptWrapper.R file as executing scripts are blocked in this organisation. 

Edit2: It actually works when published online!, including the usage of a version of ggplot2 incompatible with R~3.4.4. So clearly there's a difference in how R Script visuals process bewtween Power BI Desktop and Power BI service.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.