Obsidian not recognizing my YMAL metadata?

What I’m trying to do

Hi Everyone,

Please bear with me as I try to explain my issue.

So I recently watched this video where they demonstrate a neat reading list design using multiple plugins, namely Book Search and Dataview.

I followed the YouTube video, copying the same steps, which for the most part has worked. When I search for a book it pulls out all the relevant information and packs it into the notes frontmatter.

However, I am unable to use a dataview query on some of these notes as Obsidian isn’t recognizing the properties.

Things I have tried

  1. I have tried making a note from scratch and not using the plugin.

  2. I have opened a separate vault and tried it there too with no success.

The query I am asking:

And this is the YAML metadata automatically injected into the note by the Book Search plugin when I search for a book:

But these properties are not being recognized by obsidian and don’t show up in reading mode:

image

but with some other books, it appears to have no issue understanding the properties:

So I am completely lost and was wondering if anyone knew why this happened or how I can mitigate this from happening.

Any help would be very much appreciated. Thanks :slightly_smiling_face:

EDIT: I wanted to add that I have even copied out manually the metadata into a new note but got the same result…or lack of it in this case. But it seems to be random where some work and some don’t. Is there a specific recipe or specific thing I am doing wrong?

Can you share the properties causing the error? (It’s tough to test them via an image, haha). I get that the plugin automatically generates the YAML properties, but if they’re failing, even when copied to a new note, we might be able to spot where they’re breaking (Maybe it’s because a line break in the cover url?).

You can try: https://www.yamllint.com/

I tested this, and it’s working for me (But this is my interpretation of your image, not your text):

---
tags: books
type: development
title: Harry Potter and the Chamber of Secrets
author: J.K. Rowling
publisher: Pottermore Publishing
published: 2015-12-08
total_pages: 350
isbn: 9781781100226
category: Juvenile Fiction
cover_url: http://books.google.com/books/content?id=107D0m_osFEC&printsec=frontcover&img=1&zoom=1&edge=cur1&source=gbs_api
rating:
status: WTR
start_read_date:
end_read_date:
created: 2023-12-31
---

Hi Sanyaissues,

Thank you so much for taking the time to reply!

I had no idea resources like https://www.yamllint.com/ even existed.

This has fixed my problem as it was showing there was an error in some of the notes it pulled having a “:” within the metadata and thus not recognizing the nested mapping.

Thank you very much for the help and I will be using that more often.

Have a great day! :grin:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.