Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hey, I am trying to run a correlation matrix plot on powerBI but I get the following error:
Feedback Type:
Frown (Error)
Error Message:
The Python process ended unexpectedly, so the visual can't be displayed. Please try running it again.
Stack Trace:
Javascript: Error
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: The Python process ended unexpectedly, so the visual can't be displayed. Please try running it again. ---> System.ComponentModel.Win32Exception: Access is denied
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at Microsoft.PowerBI.Scripting.Python.PythonScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.Python.PythonScriptHandler.GenerateVisual(ScriptHandlerOptions options)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.Python.PythonScriptHandler.GenerateVisual(ScriptHandlerOptions options)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.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, CancellationToken cancelToken)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, IList`1 queries, HashSet`1 pendingQueriesToCancel, EngineDataModel engineDataModel)
Stack Trace Message:
The Python process ended unexpectedly, so the visual can't be displayed. Please try running it again.
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.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.Utilities.PowerBIFormUnexpectedExceptionHandler.HandleException(Exception e)
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.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, Object state)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.AllowModalDialogs(Action action)
at Microsoft.PowerBI.Client.Windows.HostServiceDispatcher.<>c__DisplayClass14_0.<ExecuteOnUIThreadAndHandlePromise>b__0()
at Microsoft.PowerBI.Client.Windows.HostServiceDispatcher.ExecuteOnUIThreadAndHandlePromise[T](Func`1 func, IPromiseStore promiseStore, Int64 promiseHandle)
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.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.PowerBI.Client.Windows.WebView2.WebView2Interop.InvokeCs(InteropCall call)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
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.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass6_0.<RunApplication>b__0()
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.RunApplication(String[] args)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.118.828.0","ModuleName":"","Component":"","Error":"Error","MethodDef":"","ErrorOffset":"-1:-1","ErrorCode":""}
Snapshot Trace Logs:
C:\Users\user1\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot443820b5-59d4-4d08-857c-cb70d4b79660.zip
Model Default Mode:
Import
Model Version:
PowerBI_V3
Performance Trace Logs:
C:\Users\user1\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip
Enabled Preview Features:
PBI_enableWebView2
PQ_WebView2Connector
PBI_sparklines
PBI_scorecardVisual
PBI_NlToDax
PBI_fieldParametersSuperSwitch
PBI_horizontalFusion
PBI_setLabelOnExportPdf
PBI_newCard
Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PBI_angularRls
PBI_onObject
PBI_dynamicFormatString
PBI_oneDriveSave
PBI_oneDriveShare
PBI_gitIntegration
Disabled DirectQuery Options:
TreatHanaAsRelationalSource
Cloud:
GlobalCloud
PowerBIUserFeedbackServices_IsReported:
True
Formulas:
section Section1;
shared #"FACT Jira" = let
Source = Sql.Database("database", "database"),
dbo_Jira_Transform = Source{[Schema="db",Item="FactJira"]}[Data]
in
dbo_Jira_Transform;
shared #"FACT Float" = let
Source = Sql.Database("database", "database"),
dbo_Float_Transform = Source{[Schema="db",Item="FactFloat"]}[Data]
in
dbo_Float_Transform;
shared #"FACT Revenue" = let
Source = Sql.Database("database", "database"),
dbo_Revenue = Source{[Schema="db",Item="Revenue"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(dbo_Revenue,{{"Month", type date}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Month", "Date"}, {"Cost", "Revenue"}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Revenue", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type1",",","",Replacer.ReplaceText,{"Revenue"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","-","",Replacer.ReplaceText,{"Revenue"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Replaced Value1",{{"Revenue", Int64.Type}})
in
#"Changed Type2";
shared #"FACT CRM" = let
Source = Sql.Database("database", "database"),
dbo_CRM = Source{[Schema="db",Item="CRM"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_CRM, each ([Client] <> null)),
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows",{{"Onboardingfee", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type","-"," ",Replacer.ReplaceText,{"Onboardingfee"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value",{{"Onboardingfee", Int64.Type}, {"Nodes", Int64.Type}, {"Seats", Int64.Type}})
in
#"Changed Type1";
shared FactCosts = let
Source = Sql.Database("database", "database"),
dbo_FactCosts = Source{[Schema="db",Item="FactCosts"]}[Data]
in
dbo_FactCosts;
shared FactMargin = let
Source = Sql.Database("database", "database"),
dbo_FACT_Margin = Source{[Schema="db",Item="FactMargin"]}[Data],
#"Replaced Value" = Table.ReplaceValue(dbo_FACT_Margin,null,0,Replacer.ReplaceValue,{"contribution_margin"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",null,0,Replacer.ReplaceValue,{"gross_margin"}),
#"Removed Columns" = Source{[Schema="db",Item="FactMargin"]}[Data]
in
#"Removed Columns";
shared Budget = let
Source = Sql.Database("database", "database"),
dbo_Budget = Source{[Schema="db",Item="Budget"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(dbo_Budget,{{"Month", type date}, {"GMMargin", Percentage.Type}, {"CMMargin", Percentage.Type}, {"SOCHeads", Int64.Type}, {"SOCRevenue", Int64.Type}})
in
#"Changed Type";
shared Cost = let
Source = Sql.Database("database", "database"),
dbo_Cost = Source{[Schema="db",Item="Cost"]}[Data]
in
dbo_Cost;
shared CleanJiraData = let
Source = Sql.Database("database", "database"),
dbo_CleanJiraData = Source{[Schema="dbo",Item="CleanJiraData"]}[Data]
in
dbo_CleanJiraData;
shared LoggedTime = let
Source = Sql.Database("database", "database"),
dbo_LoggedTime = Source{[Schema="db",Item="LoggedTime"]}[Data]
in
dbo_LoggedTime;
Any ideas where this is coming from?
This is the code:
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(Gross Margin, Manual Tickets per User, Jira timespent per user, Automation %, Average Tickets per Month)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
f, ax = plt.subplots(figsize = (14,10))
sns.heatmap(dataset.corr(), annot = True, fmt = ".1f", ax= ax)
plt.show
your plt has nothing to show as you don't render into it. You need to add the sns.heatmap result to the surface/canvas.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
61 | |
46 | |
45 |