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

Bug: XML Parsing error if instructor notes are empty #505

Closed
apirogov opened this issue Aug 29, 2023 · 2 comments · Fixed by #509
Closed

Bug: XML Parsing error if instructor notes are empty #505

apirogov opened this issue Aug 29, 2023 · 2 comments · Fixed by #509
Assignees
Labels
bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons good first issue Good for newcomers

Comments

@apirogov
Copy link

As far as I understand, the instructors/instructor-notes.md provide the information at the top, while the rest of the notes is auto-generated.

Currently you HAVE to write something there, i.e.

---
title: Instructor notes
---

will fail with an error:

Fehler in UseMethod("xml_find_all") : 
  nicht anwendbare Methode für 'xml_find_all' auf Objekt der Klasse "xml_document" angewendet

using sandpaper (0.12.4), pegboard (0.5.3), and varnish (0.2.18).

@zkamvar zkamvar added bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons labels Aug 29, 2023
@zkamvar
Copy link
Contributor

zkamvar commented Aug 29, 2023

This is similar to #441 and I agree that it should be fixed.

The fix for this particular issue is to add an else statment to these lines:

if (html != '') {
html <- xml2::read_html(html)
fix_nodes(html)
}

     if (html != '') {
       html  <- xml2::read_html(html)
       fix_nodes(html)
+    } else {
+      html  <- xml2::read_html("<p></p>")
     }

I think this is a good first issue for one of the @carpentries/workbench-maintainers to tackle if they have time.

@zkamvar zkamvar added the good first issue Good for newcomers label Aug 29, 2023
@klbarnes20
Copy link
Contributor

I can give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants