Dataview error: Mark Decorations May Not Be Empty

I have been setting up a GTD system with Obsidian, Dataview & Templater. It’s been working well, except a strange thing that has recently been ocurring.

Here’s the set up: I have a GTD folder, with a subfolder for next actions. Each file in next actions has metadata like the following:

---
aliases: [ ] 
tags: [ ]
note_type: gtd
gtd_type: "next action"
context: Anywhere 
date: 2022-04-07
---
- [ ] Next action goes here.

I then have pages in the GTD folder for each of these contexts, like the following “Anywhere” context page:

```dataview
TASK 
FROM "GTD/Next Actions"
WHERE !completed AND context = "Anywhere"

I then have one note, “Contexts” with links to each of these pages.

Here’s the weird thing; when I look at my task lists generated by dataview, at first I was able to simply click on the task to be taken to the associated action file. Now, some of these links work, and some don’t. When I click some of them, I am not taken to the existing action file, but instead a new file is being created in a subdirectory, with the task as the filename; this follows a more complicated scheme I was following earlier. A path like GTD/Contexts/Anywhere/ appears, containing the new file. I get an error also saying:

Mark decorations may not be empty.

I have not been able to figure out what that means, or what the difference is between the files whose links work and which don’t. The metadata for those that work and those that don’t is indistinguishable.

Also, I can find nothing in the documentation for Dataview that helps me figure out why some of these don’t detect the existing file, or why and how it is creating this path.

Things I have tried

I have compared the files that work with those that don’t, and I have read over the dataview documentation and tried a bunch of searches, including for that error message. Nohting remotely on point comes up.

What I’m trying to do

I just want to be able to click the tasks in my dataview tasks lists and be taken to the existing files. Any help would be much appreciated!

This seems like a great question for the “Discussions” section of the Dataview GitHub repo: the developer is pretty active as are some very knowledgeable dataview users.

I think “Mark decorations may not be empty” is an indication that Obsidian is pretty confused by whatever Dataview is doing! My guess is that Obsidian is expecting content in that file, there is not any, and so something “empty” is being sent as an answer to a part of Obsidian that does not expect empty answers. Definitely pass this error message along in your question on the GitHub.

I wonder if there is a way to clear out any caching that Dataview was doing. I wonder if disabling the plugin (toggle it in the Settings → Community Plugins page) and restarting Obsidian, then re-enable and restart again, would do it? Not sure though.

Best of luck, I hope the experts on GitHub can help!

I restarted obsidian and the behavior seems to be totally gone. All the tasks that were doing this are opening fine, along with every other one that I tried.

Thank you!

1 Like

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