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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors