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.
Hi everyone,
I'm trying to create an R visual in Power BI, after I have onfigured the R-scripting to my most recent R-version:
However, I keep running into the following error message when running the R-script:
I assumed RScriptWrapper.R is a temporary file that Power BI creates itself in order to create the visuals.
So I don't understand such a file can't be found when Power BI should create it temporarily to execute the R-script.
Does anyone have an idea how to tackle this problem?
Thanks in advance
I have made a test but couldn't reproduce this issue. Have you updated the latest version of power bi?
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for trying.
I had the March 2019 version. Just now I have installed the April 2019 version. My problem isn't solved but I do get another error message:
Release:
April, 2019
Product Version:
2.68.5432.661 (19.04) (x64)
Error Message:
A problem occurred while processing your R script.
Here are the technical details: Working directory does not exist: C:\Program Files\R\R-3.5.2\library.Double-check that R is installed correctly on your machine.
R-3.5.2 was my old R-version. I now run R-3.5.3 and in the options setting Power BI clearly states R-3.5.3 as home directory. So I don't understand it looks for an old version that is no longer on my drive.
Even when I add Setwd("C:/Program Files/R/R-3.5.3") to my R-code it looks for 3.5.2
Does this give you any idea on where it goes wrong?
Sadly I can't seem to find the problem at all. Nobody has ever had the problem of power BI referring to an old R library?
Feedback Type:
Frown (Error)
Timestamp:
2019-04-16T12:17:03.6331495Z
Local Time:
2019-04-16T14:17:03.6331495+02:00
Session ID:
4973bfd1-13c6-4233-9411-869ff834e17d
Release:
April, 2019
Product Version:
2.68.5432.661 (19.04) (x64)
Error Message:
A problem occurred while processing your R script.
Here are the technical details: Working directory does not exist: C:\Program Files\R\R-3.5.2\library.Double-check that R is installed correctly on your machine.
Stack Trace:
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: A problem occurred while processing your R script.
Here are the technical details: Working directory does not exist: C:\Program Files\R\R-3.5.2\library.Double-check that R is installed correctly on your machine. ---> Microsoft.PowerBI.Scripting.R.Exceptions.RUnexpectedException: A problem occurred while processing your R script.
Here are the technical details: Working directory does not exist: C:\Program Files\R\R-3.5.2\library.
at Microsoft.PowerBI.Scripting.R.RWrapper.GetWorkingFolder(String parentPath, String workingDirectoryPrefix)
at Microsoft.PowerBI.Scripting.R.RWrapper.CreateRScriptFile(String script, String parentPath, String workingDirectoryPrefix)
at Microsoft.PowerBI.Scripting.R.RScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.Run(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDataShapeResult(QueryCommand transformCommand, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ExecuteDataQuery(IQueryResultDataWriter queryResultDataWriter, EngineDataModel engineDataModel, DataQuery query, Int32 queryId, ServiceErrorStatusCode& serviceErrorStatusCode)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, ExecuteSemanticQueryRequest request, EngineDataModel engineDataModel)
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.ErrorHostService.GetErrorDetails(ShowErrorDialogArgs args)
at Microsoft.PowerBI.Client.Windows.ErrorHostService.<>c__DisplayClass2_0.<<ShowErrorDialog>b__0>d.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.ErrorHostService.<>c__DisplayClass2_0.<ShowErrorDialog>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass1_0`1.<SendAndMarshalExceptions>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass0_1.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_0.<Main>b__1()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
OS Version:
Microsoft Windows NT 6.1.7601 Service Pack 1 (x64 en-US)
CLR Version:
4.7 or later [Release Number = 461814]
Peak Virtual Memory:
4.16 GB
Private Memory:
382 MB
Peak Working Set:
521 MB
IE Version:
11.0.9600.19326
User ID:
8b7a3346-800d-409d-869c-2607ae0ed05c
Workbook Package Info:
1* - nl-BE, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.
Telemetry Enabled:
True
Model Default Mode:
Import
Snapshot Trace Logs:
C:\Users\kegoosse\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot1504631839.zip
Performance Trace Logs:
C:\Users\kegoosse\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip
Enabled Preview Features:
PBI_shapeMapVisualEnabled
Disabled Preview Features:
PBI_SpanishLinguisticsEnabled
PBI_NewWebTableInference
PBI_showIncrementalRefreshPolicy
PBI_showManageAggregations
PBI_improvedFilterExperience
PBI_qnaLiveConnect
PBI_keyDrivers
Disabled DirectQuery Options:
TreatHanaAsRelationalSource
Cloud:
GlobalCloud
DPI Scale:
125%
Supported Services:
Power BI
Formulas:
section Section1;
shared #"1Table1" = let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMlKKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}})
in
#"Changed Type";
Have you check if the new version is before the old version in environment Variables?
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
What exactly am I looking for in these environmental variables?
Meanwhile I noticed that, allthough the R visual gives an error message in the Power BI desktop, it does work when I publish it to my workspace in the Power BI online app. I'm clueless as to why this could happen...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |