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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

JSON Error - opening PBI file

Hello,

 

I'm receiving this error when opening a PBIX desktop file. How can I fix it? It doesn't even say what file is impacted and I can't open the desktop file to see where the error is. I have the latest version of PBI desktop downloaded.

 

The path name referenced is unfamiliar - Path 'DirectQueryResources', line 1, position 1765.

 

Error Message:
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.IReadOnlyDictionary`2[System.String,Microsoft.PowerBI.Packaging.Storage.DirectQueryResourceInfoStorage]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'DirectQueryResources', line 1, position 1765.

 

Status: New
Comments
v-lili6-msft
Community Support

HI

Update to the latest version Power BI Desktop (Version: 2.90.1081.0 64-bit (February 2021)),

Also check you are running the 32- or 64-bit version that matches your operating system,

and reboot your computer and then try to run Power BI desktop with admin, then open the report via File -> Open in Power BI desktop. 

 

Regards,

Lin

Anonymous
Not applicable

This doesn't work.  I've been getting a similar error for months.  And this approach doesn't fix anything.

mwrdm
Frequent Visitor

Hi all,

 

I had this issue today and managed to resolve it. Mine was with "PendingConceptualSchemaFilters" rather than "DirectQueryResources" as described in the first post in this thread but I believe it is the same issue.

 

Here is how I did it:

 

  1. Install 7-zip
  2. Right click on your .pbix file and click "Open archive" in the 7-zip options
  3. Open the Metadata file from the directory in a text editor such as Notepad++ (or just Notepad).
  4. Locate the object (in my case, PendingConceptualSchemaFilters).

    mwrdm_0-1680471310650.png

     

  5. You can see that there is nothing in the array. For that reason, I simply deleted the object

    mwrdm_1-1680471352774.png

     

  6. Now, the Metadata file you are working on is NOT actually the one inside the pbix file. If you check the path, it is probably in a temp directory. For that reason, you need to save the file and then drag it into the 7-zip window (where you have the pbix directory open) and overwrite the existing Metadata file.

I recommend creating a copy of the pbix file to do this on, in case you mess something else up.

 

Good luck.