cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamSan Visitor
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
Highlighted
Microsoft v-ljerr-msft
Microsoft

Re: Unexpected Error - operation not valid

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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors