Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Thias
Frequent Visitor

Error: 'FormatString' is an unexpected token. Expecting white space. After installing Feb 2024

Hi all, 

 

since i installed the new Feb 2024 (before used the November release) I cannot oben on Power BI project (saved as pbip format) in Power BI desktop. I get the error: 'FormatString' is an unexpected token. Expecting white space. Line 1, position 83.

 

I have no clue what this means and how to fix it since i cannot open it. Basically i could addit the pbip project in vs code. 

 

The project is published via git into a premium Power BI workspace where it works as expected. Downloading the pbip from the repo or the semantic model from the workspace leads to the same error when trying to open it with PBI Desktop. 


I would appreciate some help on that issue.

Best regards
Thias

2 REPLIES 2
Anonymous
Not applicable

Hi @Thias ,

Please check the following steps:

  1. Please look for any instances of "formatString" in the project files, particularly in the file if you're working with custom visuals. The error message suggests there might be a syntax issue around the 'FormatString' token. Ensure that the syntax matches the expected format as outlined in the Power BI documentation for defining support for dynamic format strings.capabilities.json
  2. Since the error mentions an unexpected token and expecting white space, it's crucial to validate the JSON files within your PBIP project. You can use online JSON validators or VS Code extensions to check for any syntax errors that might have been introduced.
  3. If you've made any changes to the PBIP project files outside of Power BI Desktop, ensure that these changes are supported. As mentioned in the Power BI documentation, certain schema details are not documented, and changes to specific files outside of Power BI Desktop are not supported during the preview phase.

Capabilities and properties of Power BI visuals - Power BI | Microsoft Learn

Power BI Desktop projects (PBIP) - Power BI | Microsoft Learn

 

If it does not help, please provide more details.

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Hi @Anonymous ,

thank you for your detailed advices. 

 

As this is a quite new dataset there are no reports build so far. Only one visual for data checking was present. The report.json is empty more or less. The only file where "formatString" occurs is model.bim. Here I can find it 325 times. The json check gives no issues with this file. No dynamic format strings where used at all. 

I made several changes through the tabular editor in this dataset. As Tabular Editor version was not up to date a assume this caused maybe some issues with the model.bim format. 
What i did on short notice is to rebuild the dataset from scratch with the new Power BI and Tabular Editor 2 version. I could transfer lot of stuff from the old model.bim to the new one with Tabular Editor so it was not much effort. 

Nevertheless it would be interesting to know the route cause of this issue. 
Here is the complete error (without the ModelChangeResults as i cannot post it here): 

Feedback Type:
Frown (Error)

Error Message:
'FormatString' is an unexpected token. Expecting white space. Line 1, position 83.

Stack Trace:
System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at Microsoft.PowerBI.Modeling.Contracts.DataModel.FormatInformation.GetFromXml(String formatXml)
at Microsoft.PowerBI.Modeler.FormatUtility.GetFormatInformation[T](NamedMetadataObjectCollection`2 annotations)
at Microsoft.PowerBI.Modeler.FormatUtility.UpgradeFormatInformation(NamedMetadataObject namedMetadataObject)
at Microsoft.PowerBI.Modeling.Engine.Authoring.SchemaChangeApplier.Apply(IModelEditor modelEditor, IEnumerable`1 changes, IRefreshPolicyUpdater refreshPolicyUpdater, IPrivateInformationService privateInformationService)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.ModelAuthoringTransaction.<>c__DisplayClass27_0.<ExecuteChange>b__0(IEnumerable`1 changes)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.ModelAuthoringTransaction.ExecuteChange(ModelChange modelChange, Boolean isTrustedSource, Boolean saveChange, ISchemaChangeApplierFactory schemaChangeApplierFactory, IRefreshPolicyUpdater refreshPolicyUpdater, IPrivateInformationService piiService, String descriptionToTrace)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.ExtendedModelChangeScope.ExecuteChange(ModelChange modelChange, Boolean isTrustedSource, Boolean saveChange, String descriptionToTrace)
at Microsoft.PowerBI.Modeling.Engine.Upgrade.ModelUpgrader.UpgradeFormatStrings(IDataModel dataModel, IExtendedModelChangeScope scope)
at Microsoft.PowerBI.Modeling.Engine.Upgrade.ModelUpgrader.RunPreV3UpgradesImpl(IExtendedModelChangeScope scope, ModelUpgradeResult upgradeResult, IDataModel dataModel, ModelingMashupDocument mashupDocument, String currentProductVersion)
at Microsoft.PowerBI.Modeling.Engine.Upgrade.ModelUpgrader.<>c__DisplayClass9_0.<RunPreV3Upgrades>b__0()
at Microsoft.PowerBI.Modeling.Engine.Upgrade.ModelUpgrader.ExecuteAndSaveOrCommit(IExtendedModelChangeScope modelChangeScope, Action actionToExecute, String description, Func`2 throwOnSaveOrCommitException)
at Microsoft.PowerBI.Modeling.Engine.Upgrade.ModelUpgrader.UpgradeModel(IExtendedModelChangeScope modelChangeScope, IModelingSession modelingSession, ModelingMashupDocument modelingMashupDocument, String currentProductVersion, IEmbeddedValueUpgrader embeddedValueUpgrader, Boolean areV3UpgradeErrorsFatal, Boolean forceUpgrade)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.ExtendedModelChangeScope.<>c__DisplayClass32_0.<UpgradeModel>b__0()
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<>c__DisplayClass6_0`1.<RunInActivity>b__0()
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.RunInActivity(ModelingActivityKind activity, Action action)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.RunInActivity[T](ModelingActivityKind activity, Func`1 action)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.DesktopModelingHost.<>c__DisplayClass19_0.<UpgradeModel>b__0(IExtendedModelChangeScope scope)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.DesktopModelingHost.<>c__DisplayClass26_0.<RunOutOfBandExtendedModelChange>b__0(IExtendedModelChangeScope scope)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.<>c__DisplayClass11_0.<<RunExtendedModelChangeAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.<ContinueWithAsyncOperation>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.DesktopModelingHost.<UpgradeModel>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.ReportUpgrader.<Upgrade>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.ReportPreparer.<UpgradeModel>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.ReportPreparer.<Prepare>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.BiProjectOperationHandler.<LoadFromProject>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.BiProjectOperationHandler.<LoadFromPbip>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.BiProjectOperationHandler.<LoadArtifact>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.<ExecuteAndHandleFileOpenErrors>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.<>c__DisplayClass33_0.<<OpenArtifactAndSetAsCurrent>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass13_0`1.<<BlockUIAndRun>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion[T](Task`1 task)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.BlockUIAndRun[T](Func`1 asyncMethod)
at Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.OpenArtifactAndSetAsCurrent(IPowerBIWindowService windowService, IPowerBIArtifact artifactToOpen, IExceptionHandler exceptionHandler, Nullable`1 entryPoint)
at Microsoft.PowerBI.Client.Program.TryOpenOrCreateReport(IPowerBIWindowService windowService, ICurrentArtifactManager currentArtifactManager, IFileHistoryManager fileHistoryManager, CommandLine commandLine, FileType fileType, IFileInformationProtectionManager fileInformationProtectionManager, IPowerBITelemetryService telemetryService, IExceptionHandler exceptionHandler)
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)

Stack Trace Message:
'FormatString' is an unexpected token. Expecting white space. Line 1, position 83.

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.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.126.927.0","ModuleName":"Microsoft.PowerBI.Modeling.Contracts.dll","Component":"Microsoft.PowerBI.Modeling.Contracts.DataModel.FormatInformation","Error":"System.Xml.XmlException","MethodDef":"GetFromXml","ErrorOffset":"40","ErrorCode":""}

ModelChangeResult:

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.