Diver's avatar
Diver
New Member
2 years ago
Status:
Investigating

Error opening an Excel file Storage.FileOpenException

Hi!

 

I'm trying to load a file to PowerBI Desktop that connects to an Excel sheet, and I'm geting the following error:

 

Erro de mecanismo M: 'Microsoft.MashupEngine; Não foi possível carregar arquivo ou assembly 'System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou uma de suas dependências. O sistema não pode encontrar o arquivo especificado.'.

DataModelLoadFailed

PFE_M_ENGINE_INTERNAL

Erro de mecanismo M: 'Microsoft.MashupEngine; Não foi possível carregar arquivo ou assembly 'System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou uma de suas dependências. O sistema não pode encontrar o arquivo especificado.'.


em Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromException(Exception e, String prefix)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.CreateAdditionalErrorInfo(Exception e)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
em Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
em Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
em Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
em Microsoft.PowerBI.Client.Program.RunApplicationLegacy(String[] args)
em Microsoft.PowerBI.Client.Program.Main(String[] args)


PFE_M_ENGINE_INTERNAL

PFE_M_ENGINE_INTERNAL

 

Feedback Type:
Frown (Error)

Timestamp:
2024-08-01T20:34:40.1560048Z

Local Time:
2024-08-01T17:34:40.1560048-03:00

Session ID:
6acf8900-d7d4-4d7a-8994-7464d0249440

Release:
July 2024

Product Version:
2.131.1203.0 (24.07) (x64)

Stack Trace:
Microsoft.PowerBI.Client.Windows.Storage.FileOpenException
em Microsoft.PowerBI.Client.Windows.Services.LocalAnalysisServicesDatabaseCreator.<CreateAnalysisServicesDatabaseAsync>d__6.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.PowerBI.Client.Windows.Services.AnalysisServicesDatabaseCreatorFactory.<CreateAnalysisServicesDatabaseAsync>d__1.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.PowerBI.Client.Windows.Services.PowerBIPackagingService.<Open>d__4.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.PowerBI.Client.Windows.Services.BiPackageOperationHandler.<LoadArtifact>d__24.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.<ExecuteAndHandleFileOpenErrors>d__48.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.<>c__DisplayClass33_0.<<OpenArtifactAndSetAsCurrent>b__0>d.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
em Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass13_0`1.<<BlockUIAndRun>b__0>d.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion[T](Task`1 task)
em Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.BlockUIAndRun[T](Func`1 asyncMethod)
em Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.OpenArtifactAndSetAsCurrent(IPowerBIWindowService windowService, IPowerBIArtifact artifactToOpen, IExceptionHandler exceptionHandler, Nullable`1 entryPoint)
em Microsoft.PowerBI.Client.CommandLineFileService.TryOpenOrCreateReport(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, Boolean forceCreate)
em Microsoft.PowerBI.Client.Program.<>c__DisplayClass7_0.<RunApplicationLegacy>b__0()
em Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
em Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.131.1203.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.Services.LocalAnalysisServicesDatabaseCreator+<CreateAnalysisServicesDatabaseAsync>d__6","Error":"Microsoft.PowerBI.Client.Windows.Storage.FileOpenException","MethodDef":"MoveNext - PFE_M_ENGINE_INTERNAL","ErrorOffset":"508","ErrorCode":"DataModelLoadFailed"}

InnerException0.Stack Trace:
em Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.ExecuteXmla(String xmla, ITelemetryService telemetryService)
em Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.ImageLoadDatabaseFromPbix(String databaseName, String filePath, Uri dataModelPath, ITelemetryService telemetryService)
em Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.LoadDatabaseFromPbix(String filePath, Uri dataModelPath)
em Microsoft.PowerBI.Client.Windows.Services.LocalAnalysisServicesDatabaseCreator.<CreateAnalysisServicesDatabaseAsync>d__6.MoveNext()

OS Version:
Microsoft Windows NT 10.0.22631.0 (x64 pt-BR)

CLR Version:
4.8 or later [Release Number = 533320]

Peak Virtual Memory:
70.1 GB

Private Memory:
259 MB

Peak Working Set:
717 MB

IE Version:
11.1.22621.0

User ID:
dfde3113-b918-45ba-9fef-5c135519de96

Telemetry Enabled:
True

DPI Scale:
100%

Supported Services:
Power BI

3 Comments

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Diver ,

     

    You may try clear Cache and Credentials:
    Go to File > Options and settings > Options.Under Global, select Data Load. Click on Clear Cache and Clear Permissions.
    You may aslo check for Missing Assemblies.The error message indicates a missing assembly. You might need to install or update the .NET Framework on your machine. You can download the latest version from the Microsoft .NET website.System.DirectoryServices
    After that,please right-click on the Power BI Desktop shortcut and select Run as administrator. 

     

    Hope it helps!

    Best regards.
    Community Support Team_Caitlyn

  • Hi Anonymous !

     

    Thanks for the help

     

    - Cache and Credentials cleaned.

    - .net framework 4.8.1, .net core 6 and .net core 8 runtimes installed and upated

    - PowerBI Desktop running as admin

     

    I'm still getting the same issue.

  • Just an update...

     

    I'm getting the same error message when trying to open File > Options > Datasource settings

     

    Feedback Type:
    Frown (Error)

    Error Message:
    Não foi possível carregar arquivo ou assembly 'System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou uma de suas dependências. O sistema não pode encontrar o arquivo especificado.

    Stack Trace:
    System.IO.FileNotFoundException
    em Microsoft.Mashup.Engine1.Library.ActiveDirectory.ActiveDirectoryModule.DomainsFunctionValue..ctor(IEngineHost host)
    em Microsoft.Mashup.Engine1.Library.ActiveDirectory.ActiveDirectoryModule.<>c__DisplayClass10_0.<GetSharedExports>b__0(Int32 index)
    em Microsoft.Mashup.Engine1.Runtime.RecordValue.DemandRecordValue.get_Item(Int32 index)
    em Microsoft.Mashup.Engine1.Runtime.DocumentationApplyingModule.<>c__DisplayClass3_0.<ApplyDocumentation>b__0(Int32 i)
    em Microsoft.Mashup.Engine1.Runtime.RecordValue.DemandRecordValue.get_Item(Int32 index)
    em Microsoft.Mashup.Engine1.Runtime.SerializationApplyingModule.<>c__DisplayClass2_0.<ApplySerialization>b__0(Int32 i)
    em Microsoft.Mashup.Engine1.Runtime.RecordValue.DemandRecordValue.get_Item(Int32 index)
    em Microsoft.Mashup.Engine1.Language.Linker.AssemblyRecordValue.get_Item(Int32 index)
    em Microsoft.Mashup.EngineHost.Services.LibraryInstance.MakeLibrary(IEnumerable`1 modules)
    em Microsoft.Mashup.EngineHost.Services.LibraryService.LegacyLibraryInstance.get_CurrentLibrary()
    em Microsoft.Mashup.Host.Document.DataSourceDiscovery.DataSourceDiscoveryVisitor..ctor(MashupDiscoveryOptions options, MashupPartitionCoordinateType coordinateType, HashSet`1 moduleMemberFilter, IEvaluationConstants evaluationConstants)
    em Microsoft.Mashup.Host.Document.DataSourceDiscovery.DataSourceDiscoveryVisitor.FindDataSources(IEnumerable`1 documents, HashSet`1 moduleMemberFilter)
    em Microsoft.Mashup.Host.Document.DataSourceDiscovery.DataSourceDiscoveryVisitor.FindDataSourcesForDocument(String formulaText, HashSet`1 moduleMemberFilter)
    em Microsoft.Mashup.Client.UI.Shared.Models.MigrateDataSourceService.InitializeResourceMigrationInfos()
    em Microsoft.Mashup.Client.UI.Shared.Models.MigrateDataSourceService.GetResources()
    em Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.KoBaseManageDataSourcesDialog..ctor(PackageReference packageReference, ILegacyUIHost uiHost, Queries queries, CredentialsStorage credentialsStorage, QueryPermissionsStorage queryPermissionsStorage, FirewallStorage firewallStorage, IMigrateDataSourceService migrateServices, ITelemetryService telemetryService, IQueryServices queryServices, String currentFileScopeName)
    em Microsoft.PowerBI.Client.Windows.FloatingDialog.KoManageDataSourcesDialog..ctor(ILegacyUIHost uiHost, Report report, IServiceDatasetSelector getServiceDataSetProvider, IPowerBIServiceConnector pbiServiceConnector, PowerBIMigrateDataSourceService migrateService, IPowerBITelemetryService telemetryService, IPowerBIQueryErrorEditor queryErrorEditor, IPowerBIQueryUIService queryServices, IApplicationCommands applicationCommands, IPowerBIWindowService windowService, IPowerBISettings powerBISettings, IDesktopModelingHost modelingHost, IMinervaModalDialogManager minervaDialogManager, ITelemetryServiceFactory modelingTelemetryServiceFactory, Func`1 createExceptionHandler)
    em Microsoft.PowerBI.Client.Windows.FloatingDialog.KoManageDataSourcesDialog.Show(IPowerBIWindowService windowService, IPowerBIQueryErrorEditor queryErrorEditor, IPowerBIQueryUIService queryServices, IServiceDatasetSelector getServiceDataSetProvider)
    em Microsoft.PowerBI.Client.Windows.LocalDataSourceUI.Show(ILegacyUIHost uiHost, IPowerBIWindowService windowService)
    em Microsoft.PowerBI.Client.Windows.Commands.ApplicationCommands.DataImportCommands.<ShowDataSourceSettingsDialog>d__48.MoveNext()
    --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
    em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    em Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()

    Stack Trace Message:
    Não foi possível carregar arquivo ou assembly 'System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou uma de suas dependências. O sistema não pode encontrar o arquivo especificado.

    Invocation Stack Trace:
    em Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
    em Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
    em Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
    em Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
    em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
    em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
    em Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
    em Microsoft.PowerBI.Client.Windows.Utilities.PowerBIFormUnexpectedExceptionHandler.HandleException(Exception e)
    em Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
    em System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
    em Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAwaitableAsyncExceptions(IExceptionHandler exceptionHandler, Func`1 asyncFunc)
    em Microsoft.PowerBI.Client.Windows.Commands.CompositeCommand`1.Execute(ICommand command, Object parameter)
    em Microsoft.Practices.Prism.Commands.CompositeCommand.Execute(Object parameter)
    em Microsoft.PowerBI.Client.Windows.Commands.CompositeCommand`1.Execute(T parameter)
    em Microsoft.PowerBI.Client.Windows.FileMenuHostService.ManageSettings(String id)
    em Microsoft.PowerBI.Client.Windows.FileMenuHostService.HandleMenuItem(String tabId, String id)
    em System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    em System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    em System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    em Microsoft.PowerBI.Client.Windows.HostServiceDispatcher.<>c__DisplayClass15_0.<ExecuteInteropCsMethod>b__0()
    em Microsoft.PowerBI.Client.Windows.HostServiceDispatcher.<>c__DisplayClass16_0`1.<RunAsync>b__0(Object s)
    em System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    em System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    em System.Delegate.DynamicInvokeImpl(Object[] args)
    em System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
    em System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
    em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    em System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
    em System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    em System.Windows.Forms.Control.WndProc(Message& m)
    em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    em System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    em System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    em System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    em System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    em System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    em System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    em Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
    em Microsoft.PowerBI.Client.Program.<>c__DisplayClass7_0.<RunApplicationLegacy>b__0()
    em Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
    em Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    em Microsoft.PowerBI.Client.Program.RunApplicationLegacy(String[] args)
    em Microsoft.PowerBI.Client.Program.Main(String[] args)


    PowerBINonFatalError:
    {"AppName":"PBIDesktop","AppVersion":"2.131.1203.0","ModuleName":"Microsoft.MashupEngine.dll","Component":"Microsoft.Mashup.Engine1.Library.ActiveDirectory.ActiveDirectoryModule+DomainsFunctionValue","Error":"System.IO.FileNotFoundException","MethodDef":".ctor","ErrorOffset":"-1","ErrorCode":""}

    Snapshot Trace Logs:
    C:\Users\isisk\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot68967945-f5e5-4944-af18-54a93680bc32.zip

    Model Default Mode:
    Empty

    Model Version:
    PowerBI_V1

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

    Enabled Preview Features:
    PBI_sparklines
    PBI_scorecardVisual
    PBI_NlToDax
    PBI_fieldParametersSuperSwitch
    PBI_setLabelOnExportPdf
    PBI_dynamicFormatString
    PBI_oneDriveSave
    PBI_oneDriveShare
    PBI_useModernPublishDialogs
    PBI_gitIntegration
    PBI_newCard
    PBI_buttonSlicerAuthoring
    PBI_EimLessElevatedUser
    PBI_mobileAutoReportLayout
    PBI_daxInlineCopilot
    PBI_aiNarrativesVisual
    PBI_generateMeasureDescriptionsButton
    PBI_desktopReportAuthoringCopilot

    Disabled Preview Features:
    PBI_shapeMapVisualEnabled
    PBI_SpanishLinguisticsEnabled
    PBI_qnaLiveConnect
    PBI_b2bExternalDatasetSharing
    PBI_enhancedTooltips
    PBI_onObject
    PBI_publishDialogsSupportSubfolders
    PBI_tmdlInDataset
    PBI_enhancedReportFormat
    PBI_qnaImproveLsdlCopilot
    PBI_visualCalculationsAuthoring

    Disabled DirectQuery Options:
    TreatHanaAsRelationalSource

    Cloud:
    GlobalCloud

    PowerBIUserFeedbackServices_IsReported:
    True

    Formulas:


    section Section1;