carpentries / workbench

Repository for Discussions and Materials about The Carpentries Workbench
https://carpentries.github.io/workbench/
Creative Commons Attribution 4.0 International
17 stars 7 forks source link

"no applicable method for 'xml_find_first'" error with empty Markdown file #80

Open tobyhodges opened 5 months ago

tobyhodges commented 5 months ago

I stumbled into a cryptic error from {sandpaper} when trying to build a repository that included a Mardown file with no content:

Error in UseMethod("xml_find_first") : 
  no applicable method for 'xml_find_first' applied to an object of class "xml_document"

The error still occurs if the Markdown file includes YAML front matter, but no Markdown content. See a minimal example reproducing the error.

This probably should be an error, but it would be great if the error message was more informative e.g. stating the name of the file where the problem was encountered or even saying that the problem is that the page has no content. It took me a long time to work out what the problem was when I first encountered it.