Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about debugging notes that might contain issues/errors/etc #33

Closed
megalithic opened this issue Apr 21, 2021 · 5 comments
Closed

Comments

@megalithic
Copy link

@mickael-menu .. while i've been working on zk.nvim, it's shown that a lot of my notes mnight have some sort of issue or issues with their formatting/content/etc. I'm wondering how we might go about debugging these? Thanks!

~/D/_notes                                                                                                                                                                                                                                                                                                                                                                           zk index                                                                                                                                                                                                                                                                                                                                                                          zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       
zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: mapping values are not allowed in this context                                                                                                                                                                                                                                                                                                                   
zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       
zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       zk: warning: yaml: line 4: did not find expected node content                                                                                                                                                                                                                                                                                                                       Indexed 59 notes in 0s                                                                                                                                                                                                                                                                                                                                                                + 43 added                                                                                                                                                                                                                                                                                                                                                                        
  ~ 0 modified                                                                                                                                                                                                                                                                                                                                                                        - 0 removed   
@mickael-menu
Copy link
Member

Yeah the output is not very useful here... I added the note path in the warning message in main, that should help. The yaml part means that the error is in the YAML frontmatter. If you share the frontmatter of one of the notes I can help you debug it.

zk-v0.3.0-10-gb82b217-macos-x86_64.zip

@megalithic
Copy link
Author

Thanks so much @mickael-menu!! Will give this a shot to dig further. Just having path info for erroneous files is uber helpful!

@megalithic
Copy link
Author

Yes, so helpful! So, it turns out my tags line is erroneous in my frontmatter:

tags: [#something,#meeting,#oneonone,#person_name]

Thoughts?

@mickael-menu
Copy link
Member

Yeah the problem is that # is the start of an inline comment in YAML, so you need to quote these tags if you really want to prefix them with #:

tags: ["#something", "#meeting", "#oneone", "#person_name"]

But the idiomatic YAML frontmatter would be without the #, which works without the quotes:

tags: [something, meeting, oneone, person_name]

@megalithic
Copy link
Author

🤦 thank you @mickael-menu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants