March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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?
Solved! Go to Solution.
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.
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
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |