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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.