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
JamSan
Regular Visitor

Unexpected Error - operation not valid

Opening my .pbix file I get the following error, any ideas?

 

Unexpected Error 

Operation is not valid due to the current state of the object

 

Feedback Type:
Frown (Error)

Timestamp:
2017-01-04T14:27:23.0852490Z

Local Time:
2017-01-04T14:27:23.0852490+00:00

Product Version:
2.41.4581.361 (PBIDesktop) (x64)

Release:
November 2016

IE Version:
11.576.14393.0

OS Version:
Microsoft Windows NT 10.0.14393.0 (x64 en-GB)

CLR Version:
4.6.2. or later [Release Number = 394802]

Workbook Package Info:
1* - en-GB, fastCombine: Disabled.

Peak Working Set:
324 MB

Private Memory:
254 MB

Peak Virtual Memory:
33.9 GB

Error Message:
Operation is not valid due to the current state of the object.

Stack Trace:
System.InvalidOperationException: Operation is not valid due to the current state of the object.

Server stack trace:
at Microsoft.Mashup.Host.Document.ModuleDocument.TryGetMemberPartsNode(IExpression expression, FormulaValidation validation, ILetExpression& letExpression)
at Microsoft.Mashup.Host.Document.DocumentParts.FindPaths(IList`1 documents)
at Microsoft.Mashup.Host.Document.PackageEditor.AddPackageItemLocations(HashSet`1 locations)
at Microsoft.Mashup.Host.Document.PackageEditor.SyncPackageMetadata(PackageMetadata& packageMetadata)
at Microsoft.Mashup.Host.Document.Storage.PackageStorageManager.OpenPackage(PackagePath packagePath, PackageMetadataDelta& delta)
at Microsoft.Mashup.Client.ClientShared.Model.Queries.InitializePackageMetadata(PackagePath packagePath)
at Microsoft.Mashup.Client.ClientShared.Model.Queries.Initialize(PackagePath packagePath, Func`1 canCreateSession)
at Microsoft.Mashup.Client.ClientShared.Model.Queries..ctor(PackagePath packagePath)
at Microsoft.PowerBI.Client.Windows.Report..ctor(PackagePath mashupPackagePath, IEventAggregationService eventAggregationService)
at Microsoft.PowerBI.Client.Windows.Report.Create(PackagePath mashupPackagePath)
at Microsoft.PowerBI.Client.Windows.Services.ReportFactory.CreateReportFromPowerBIPackage(IPowerBIPackage powerBIPackage, Byte[] securityBindings, Boolean requiresConversionToReportLayout, IPowerBITelemetryService powerBITelemetryService, PackageValidationResult& mashupValidationResult)
at Microsoft.PowerBI.Client.Windows.Services.FileManager.OpenFile(String filePath, Stream fileStream, Boolean isReadOnly)
at Microsoft.PowerBI.Client.Windows.Services.FileManager.OpenFile(String filePathToOpen, IWin32Window ownerWindow, ReportUpgradeResult& upgradeResult)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.<>c__DisplayClass55.<OpenLocalFileInternal>b__53()
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass1.<BlockUIAndRunAsync>b__0()
at System.Threading.Tasks.Task.Execute()

Exception rethrown at [0]:
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion(Task task)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.OpenLocalFileInternal(IWin32Window ownerWindow, WindowsHost windowsHost, ExplorationClientHost reportingClientHost, TelemetryUserActionId entryPoint, String filePath, Boolean fromRecentFile)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.OpenLocalFile(IWin32Window ownerWindow, WindowsHost windowsHost, ExplorationClientHost reportingClientHost, TelemetryUserActionId entryPoint, String filePath, Boolean fromRecentFile)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.StartDialog.UseEntry(FileHistoryEntry entry)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
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.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


User ID:
b3f0f222-6b92-4d42-a100-021d186f348a

Session ID:
0de90cbd-bb43-4b53-8c4c-88429c9b0a65

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\BasavSharma\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot357559319.zip

Performance Trace Logs:
C:\Users\BasavSharma\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Disabled Preview Features:
PBI_RedShift
PBI_Impala
PBI_Snowflake
PBI_shapeMapVisualEnabled
PBI_allowBiDiCrossFilterInDirectQuery
PBI_clusteringEnabled
PBI_esriEnabled
PBI_mobileReportAuthoringEnabled

Disabled DirectQuery Options:
DirectQuery_Unrestricted

Cloud:
GlobalCloud

DPI Scale:
125%

Formulas:


section Section1;

 

 

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @JamSan,

 

Does this issue occur to only a specific .pbix file of yours, or all of your pbix files?

 

Here is a similar thread which mentions that the error could occur when using the Power Query(M) code not properly. Could you go to check if it helps?Smiley Happy

 

Regards

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.