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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
meetkholia
Frequent Visitor

R Script Error

Hello,

 

I am new to PowerBI and trying to run a simple R script after importing some data from a CSV file. 

Following is the error :

DataSource.Error: ADO.NET: A problem occurred while processing your R script.
Here are the technical details: Could not create directory. System.UnauthorizedAccessException: Access to the path 'C:\Program Files\R\R-3.5.2\RScriptWrapper_05f049cc-3c9f-460b-a25a-d5f615913a79' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.PowerBI.Scripting.R.RWrapper.GetWorkingFolder(String parentPath, String workingDirectoryPrefix)
Details:
DataSourceKind=R
DataSourcePath=R
Message=A problem occurred while processing your R script.
Here are the technical details: Could not create directory. System.UnauthorizedAccessException: Access to the path 'C:\Program Files\R\R-3.5.2\RScriptWrapper_05f049cc-3c9f-460b-a25a-d5f615913a79' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.PowerBI.Scripting.R.RWrapper.GetWorkingFolder(String parentPath, String workingDirectoryPrefix)
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.R.Exceptions.RUnexpectedException

 

I am not sure why it is trying to create a directory with R 3.5.2 while I have the 3.6.1 version installed. Directory under Options & Setting is also 3.6.1

R Directory.jpg

Thanks,

Meet

5 REPLIES 5
v-lid-msft
Community Support
Community Support

Hi @meetkholia ,

 

It works fine with R 3.6.1 on my side, could you please reproduce this issue in the latest version of Power BI Desktop? Are there another steps applied in Power Query Editor?

 

9.PNG

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the response @v-lid-msft 

 

I was working with CSV as a test - which was resolved by updating Power BI version.

BUT, when I try to pull data from SAP HANA and then try to run R script under "Transform data", it give me the same error. 

 

Am I doing anything wrong?

 

Thanks,

Meet

Hi @meetkholia ,

 

What the highlight part shows on your side? Can you run R script with other datasource? You can also try to use the R 3.5.3 from  Revolution Open download page

 

Please don't have any Confidential Information or Real data in your reply and screenshots.

 

1.PNG

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It shows 3.6.1

No. I am trying to get data from multiple locations and want to transform it within PowerBI and then perform a join. 

data sources includes Salesforce, SAP HANA and SQL.  

 

Hi @meetkholia ,

 

Does Power BI try to use old version R script to run R script over multi data source instead of configured version R on you side? Sorry for that, We cannot reproduce the issue here and can not found an effective solution. We suggest you to open a ticket here for help if you are a pro user: https://powerbi.microsoft.com/en-us/support/

 

Support Ticket .gif

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors