Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
106 | |
99 | |
98 | |
38 | |
37 |
User | Count |
---|---|
158 | |
124 | |
76 | |
74 | |
63 |