r-lib / xml2

Bindings to libxml2
https://xml2.r-lib.org/
Other
220 stars 81 forks source link

librdf error #427

Closed maelle closed 12 months ago

maelle commented 12 months ago

I'm sorry in advance for the very vague issue but maybe it rings a bell for someone reading this?

I was seeing errors from librdf. Now I'm no longer seeing them. I have a :sob: screenshot :sob: as proof

image

I was originally seeing this for a pkgdown website build. I tried removing the faulty HTML's pieces one by one but then nothing looked faulty at all.

I'm at a loss to understand where the error (which is an error that didn't stop R) came from and what made it disappear. I did try changing options but in each call so why would it have a lasting effect.

maelle commented 12 months ago

Initial report https://github.com/ropensci-org/rotemplate/issues/106

maelle commented 12 months ago

Another occurrence of the error, h/t @jonthegeek https://cran.r-project.org/web/checks/check_results_cwbtools.html

maelle commented 12 months ago

The problem is very specific to the package I was exploring :sweat_smile: @oggioniale https://github.com/ropensci/ReLTER/tree/dev

So maybe I should close this issue as it's probably not a widespread problem.

If I load the package, then I get

> xml2::read_html("<html><body><nav>bla</nav></body></html>")
librdf error - HTML parser error: Tag nav invalid
{html_document}
<html>
[1] <body><nav>bla</nav></body>
maelle commented 12 months ago

@oggioniale I know your package uses xml2 quite a bit, so maybe you have an idea about something in the package code (onLoad() and onAttach() seems innocuous) that could lead to the problem. I see your package doesn't Depend on a package, and could not find any option/environment variable setting that could be related.

maelle commented 12 months ago

now if I restart the session, remove all files from R/, then load again I still get the error.

maelle commented 12 months ago

probably something in one of the dependencies. I'll close this so as not to pollute this issue tracker!