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

librdf error - HTML parser error: Tag #106

Closed
oggioniale opened this issue Nov 29, 2023 · 17 comments
Closed

librdf error - HTML parser error: Tag #106

oggioniale opened this issue Nov 29, 2023 · 17 comments

Comments

@oggioniale
Copy link

executing rotemplate::build_ropensci_docs(path = ".") for the package ReLTER I have some errors like this:

> rotemplate::build_ropensci_docs(path = ".")
Site needs mathjax library
== Building pkgdown site =======================================================
Reading from: '/xxx/ReLTER'
Writing to:   '/xxx/ReLTER/docs'
-- Initialising site -----------------------------------------------------------
-- Building home ---------------------------------------------------------------
Reading 'CONTRIBUTING.md'
Reading 'LICENSE.md'
Writing '404.html'
-- Building function reference -------------------------------------------------
Writing 'reference/index.html'
-

ReLTER is specially drafted for the LTER community.

To contribute to the improvement of this package, join the group of
    developers (https://github.com/ropensci/ReLTER).

If you use this package, please cite as:

Alessandro Oggioni, Micha Silver, Luigi Ranghetti & Paolo Tagliolato.
    (2023) ReLTER: An Interface for the eLTER Community (v2.1). Zenodo.
    https://doi.org/10.5281/zenodo.5576813

Type 'citation(package = 'ReLTER')' on how to cite R packages in
    publications.

Currently the DEIMS-SDR base URL is set as: https://deims.org/.
To change the URL please use set_deims_base_url().
Reading 'man/ReLTER-package.Rd'
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag main invalid
librdf error - HTML parser error: Tag aside invalid
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag footer invalid
Reading 'man/do_Q.Rd'
Reading 'man/elter_write_rdata.Rd'
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag main invalid
librdf error - HTML parser error: Tag aside invalid
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag footer invalid
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag main invalid
librdf error - HTML parser error: Tag aside invalid
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag footer invalid
Reading 'man/get_activity_info.Rd'
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag main invalid
librdf error - HTML parser error: Tag aside invalid
librdf error - HTML parser error: Tag nav invalid
librdf error - HTML parser error: Tag footer invalid
...
Session Info
> devtools::session_info()
─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.0 (2023-04-21)
 os       macOS 14.0
 system   aarch64, darwin20
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Rome
 date     2023-11-29
 rstudio  2023.06.0+421 Mountain Hydrangea (desktop)
 pandoc   3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 !  package       * version    date (UTC) lib source
    abind           1.4-5      2016-07-21 [1] CRAN (R 4.3.0)
    ape             5.7-1      2023-03-13 [1] CRAN (R 4.3.0)
    assertthat      0.2.1      2019-03-21 [1] CRAN (R 4.3.0)
    atom4R          0.3-3      2022-11-18 [1] CRAN (R 4.3.0)
    backports       1.4.1      2021-12-13 [2] CRAN (R 4.3.0)
    base64enc       0.1-3      2015-07-28 [2] CRAN (R 4.3.0)
    bit             4.0.5      2022-11-15 [2] CRAN (R 4.3.0)
    bit64           4.0.5      2020-08-30 [2] CRAN (R 4.3.0)
    bitops          1.0-7      2021-04-24 [2] CRAN (R 4.3.0)
    bold            1.3.0      2023-05-02 [1] CRAN (R 4.3.0)
    brio            1.1.3      2021-11-30 [2] CRAN (R 4.3.0)
    cachem          1.0.8      2023-05-01 [2] CRAN (R 4.3.0)
    callr           3.7.3      2022-11-02 [2] CRAN (R 4.3.0)
    class           7.3-21     2023-01-23 [2] CRAN (R 4.3.0)
    classInt        0.4-9      2023-02-28 [2] CRAN (R 4.3.0)
    cli             3.6.1      2023-03-23 [2] CRAN (R 4.3.0)
    codemeta        0.1.1      2021-12-22 [1] CRAN (R 4.3.0)
    codetools       0.2-19     2023-02-01 [2] CRAN (R 4.3.0)
    colorspace      2.1-0      2023-01-23 [2] CRAN (R 4.3.0)
    conditionz      0.1.0      2019-04-24 [1] CRAN (R 4.3.0)
    countrycode     1.4.0      2022-05-04 [2] CRAN (R 4.3.0)
    crayon          1.5.2      2022-09-29 [2] CRAN (R 4.3.0)
    crosstalk       1.2.0      2021-11-04 [2] CRAN (R 4.3.0)
    crul            1.4.0      2023-05-17 [1] CRAN (R 4.3.0)
    curl            5.1.0      2023-10-02 [1] CRAN (R 4.3.1)
    cyclocomp       1.1.1      2023-08-30 [1] CRAN (R 4.3.0)
    data.table      1.14.8     2023-02-17 [2] CRAN (R 4.3.0)
    DBI             1.1.3      2022-06-18 [2] CRAN (R 4.3.0)
    desc            1.4.2      2022-09-08 [2] CRAN (R 4.3.0)
    devtools        2.4.5      2022-10-11 [2] CRAN (R 4.3.0)
    dichromat       2.0-0.1    2022-05-02 [1] CRAN (R 4.3.0)
    digest          0.6.33     2023-07-07 [1] CRAN (R 4.3.0)
    dlstats         0.1.7      2023-05-24 [1] CRAN (R 4.3.0)
    dotCall64       1.0-2      2022-10-03 [1] CRAN (R 4.3.0)
    downlit         0.4.3      2023-06-29 [1] CRAN (R 4.3.0)
    dplyr           1.1.3      2023-09-03 [1] CRAN (R 4.3.0)
    dtplyr          1.3.1      2023-03-22 [1] CRAN (R 4.3.0)
    e1071           1.7-13     2023-02-01 [2] CRAN (R 4.3.0)
    ellipsis        0.3.2      2021-04-29 [2] CRAN (R 4.3.0)
    evaluate        0.23       2023-11-01 [1] CRAN (R 4.3.1)
    extrafont       0.19       2023-01-18 [1] CRAN (R 4.3.0)
    extrafontdb     1.0        2012-06-11 [1] CRAN (R 4.3.0)
    fansi           1.0.5      2023-10-08 [1] CRAN (R 4.3.1)
    farver          2.1.1      2022-07-06 [2] CRAN (R 4.3.0)
    fastmap         1.1.1      2023-02-24 [2] CRAN (R 4.3.0)
    fields          14.1       2022-08-12 [1] CRAN (R 4.3.0)
    foreach         1.5.2      2022-02-02 [1] CRAN (R 4.3.0)
    foreign         0.8-84     2022-12-06 [2] CRAN (R 4.3.0)
 VP fs              1.6.2      2023-07-20 [2] CRAN (R 4.3.0) (on disk 1.6.3)
    gdalUtilities   1.2.4      2023-03-21 [1] CRAN (R 4.3.0)
    generics        0.1.3      2022-07-05 [2] CRAN (R 4.3.0)
    geodata         0.5-8      2023-04-14 [1] CRAN (R 4.3.0)
    geojsonsf       2.0.3      2022-05-30 [1] CRAN (R 4.3.0)
    ggforce         0.4.1      2022-10-04 [1] CRAN (R 4.3.0)
    ggplot2         3.4.2      2023-04-03 [2] CRAN (R 4.3.0)
    glue            1.6.2      2022-02-24 [2] CRAN (R 4.3.0)
    gridExtra       2.3        2017-09-09 [2] CRAN (R 4.3.0)
    gtable          0.3.3      2023-03-21 [2] CRAN (R 4.3.0)
    hms             1.1.3      2023-03-21 [2] CRAN (R 4.3.0)
    htmltools       0.5.7      2023-11-03 [1] CRAN (R 4.3.1)
    htmlwidgets     1.6.2      2023-03-17 [2] CRAN (R 4.3.0)
    httpcode        0.3.0      2020-04-10 [2] CRAN (R 4.3.0)
    httpuv          1.6.12     2023-10-23 [1] CRAN (R 4.3.1)
    httr            1.4.7      2023-08-15 [1] CRAN (R 4.3.0)
    httr2           0.2.2      2022-09-25 [2] CRAN (R 4.3.0)
    iterators       1.0.14     2022-02-05 [1] CRAN (R 4.3.0)
    jqr             1.2.3      2022-03-10 [1] CRAN (R 4.3.0)
    jsonlite        1.8.7      2023-06-29 [1] CRAN (R 4.3.0)
    KernSmooth      2.23-20    2021-05-03 [2] CRAN (R 4.3.0)
    keyring         1.3.1      2022-10-27 [1] CRAN (R 4.3.0)
    knitr           1.45       2023-10-30 [1] CRAN (R 4.3.1)
    later           1.3.1      2023-05-02 [2] CRAN (R 4.3.0)
    lattice         0.21-8     2023-04-05 [2] CRAN (R 4.3.0)
    lazyeval        0.2.2      2019-03-15 [2] CRAN (R 4.3.0)
    leafem          0.2.0      2022-04-16 [1] CRAN (R 4.3.0)
    leaflet         2.1.2      2023-03-10 [2] CRAN (R 4.3.0)
    leafsync        0.1.0      2019-03-05 [1] CRAN (R 4.3.0)
    lifecycle       1.0.4      2023-11-07 [1] CRAN (R 4.3.1)
    lintr           3.1.1      2023-11-07 [1] CRAN (R 4.3.1)
    lubridate       1.9.2      2023-02-10 [1] CRAN (R 4.3.0)
    lwgeom          0.2-13     2023-05-22 [1] CRAN (R 4.3.0)
    magrittr        2.0.3      2022-03-30 [2] CRAN (R 4.3.0)
    maps            3.4.1      2022-10-30 [1] CRAN (R 4.3.0)
    maptools        1.1-7      2023-05-29 [1] CRAN (R 4.3.0)
    MASS            7.3-58.4   2023-03-07 [2] CRAN (R 4.3.0)
    memoise         2.0.1      2021-11-26 [2] CRAN (R 4.3.0)
    mime            0.12       2021-09-28 [2] CRAN (R 4.3.0)
    miniUI          0.1.1.1    2018-05-18 [2] CRAN (R 4.3.0)
    MODIStsp        2.0.10     2023-06-12 [1] CRAN (R 4.3.0)
    munsell         0.5.0      2018-06-12 [2] CRAN (R 4.3.0)
    nlme            3.1-162    2023-01-31 [2] CRAN (R 4.3.0)
    oai             0.4.0      2022-11-10 [2] CRAN (R 4.3.0)
    pillar          1.9.0      2023-03-22 [2] CRAN (R 4.3.0)
    pkgbuild        1.4.2      2023-06-26 [1] CRAN (R 4.3.0)
    pkgconfig       2.0.3      2019-09-22 [2] CRAN (R 4.3.0)
    pkgdown         2.0.7      2022-12-14 [1] CRAN (R 4.3.0)
    pkgload         1.3.3      2023-09-22 [1] CRAN (R 4.3.1)
    plyr            1.8.9      2023-10-02 [1] CRAN (R 4.3.1)
    png             0.1-8      2022-11-29 [2] CRAN (R 4.3.0)
    polyclip        1.10-4     2022-10-20 [1] CRAN (R 4.3.0)
    prettyunits     1.2.0      2023-09-24 [1] CRAN (R 4.3.1)
    processx        3.8.2      2023-06-30 [1] CRAN (R 4.3.0)
    profvis         0.3.8      2023-05-02 [2] CRAN (R 4.3.0)
    promises        1.2.1      2023-08-10 [1] CRAN (R 4.3.0)
    proxy           0.4-27     2022-06-09 [2] CRAN (R 4.3.0)
    ps              1.7.5      2023-04-18 [2] CRAN (R 4.3.0)
    purrr           1.0.2      2023-08-10 [1] CRAN (R 4.3.0)
    qrcode          0.2.1      2022-12-18 [1] CRAN (R 4.3.0)
    R6              2.5.1      2021-08-19 [2] CRAN (R 4.3.0)
    rappdirs        0.3.3      2021-01-31 [2] CRAN (R 4.3.0)
    raster          3.6-20     2023-03-06 [2] CRAN (R 4.3.0)
    rbibutils       2.2.13     2023-01-13 [1] CRAN (R 4.3.0)
    RColorBrewer    1.1-3      2022-04-03 [2] CRAN (R 4.3.0)
    Rcpp            1.0.11     2023-07-06 [1] CRAN (R 4.3.0)
    RCurl           1.98-1.12  2023-03-27 [2] CRAN (R 4.3.0)
    rdflib          0.2.7      2023-09-16 [1] CRAN (R 4.3.0)
    Rdpack          2.4        2022-07-20 [1] CRAN (R 4.3.0)
    readr           2.1.4      2023-02-10 [2] CRAN (R 4.3.0)
    rebird          1.3.0      2021-09-20 [1] CRAN (R 4.3.0)
    redland         1.0.17-17  2023-05-23 [1] CRAN (R 4.3.0)
 VP ReLTER        * 2.2.0      2023-10-13 [?] load_all() (on disk 2.1.2)
    remotes         2.4.2      2021-11-30 [2] CRAN (R 4.3.0)
    rex             1.2.1      2021-11-26 [1] CRAN (R 4.3.0)
    rgbif           3.7.7      2023-04-03 [2] CRAN (R 4.3.0)
    ridigbio        0.3.6      2022-08-22 [1] CRAN (R 4.3.0)
    rlang           1.1.2      2023-11-04 [1] CRAN (R 4.3.1)
    rmarkdown       2.25       2023-09-18 [1] CRAN (R 4.3.1)
    rnaturalearth   0.3.2      2023-01-23 [2] CRAN (R 4.3.0)
    rosm            0.2.6      2022-06-09 [1] CRAN (R 4.3.0)
    rotemplate      2.0.0      2023-11-29 [1] Github (ropensci-org/rotemplate@4644c12)
    roxygen2        7.2.3      2022-12-08 [2] CRAN (R 4.3.0)
    rprojroot       2.0.4      2023-11-05 [1] CRAN (R 4.3.1)
    rstudioapi      0.15.0     2023-07-07 [1] CRAN (R 4.3.0)
    Rttf2pt1        1.3.12     2023-01-22 [1] CRAN (R 4.3.0)
    rvertnet        0.8.2      2021-05-13 [1] CRAN (R 4.3.0)
    rworldmap       1.3-6      2016-02-03 [1] CRAN (R 4.3.0)
    s2              1.1.4      2023-05-17 [1] CRAN (R 4.3.0)
    scales          1.2.1      2022-08-20 [2] CRAN (R 4.3.0)
    sessioninfo     1.2.2      2021-12-06 [2] CRAN (R 4.3.0)
    sf              1.0-14     2023-07-11 [1] CRAN (R 4.3.0)
    shiny           1.7.4.1    2023-07-06 [1] CRAN (R 4.3.0)
    sp              1.6-0      2023-01-19 [2] CRAN (R 4.3.0)
    spam            2.9-1      2022-08-07 [1] CRAN (R 4.3.0)
    spocc           1.2.2      2023-03-23 [1] CRAN (R 4.3.0)
    stars           0.6-1      2023-04-06 [1] CRAN (R 4.3.0)
    stringi         1.8.2      2023-11-23 [1] CRAN (R 4.3.1)
    stringr         1.5.1      2023-11-14 [1] CRAN (R 4.3.1)
    taxize          0.9.100    2022-04-22 [1] CRAN (R 4.3.0)
    terra           1.7-29     2023-04-22 [2] CRAN (R 4.3.0)
    testthat      * 3.1.8      2023-05-04 [2] CRAN (R 4.3.0)
    tibble          3.2.1      2023-03-20 [2] CRAN (R 4.3.0)
    tidyr           1.3.0      2023-01-24 [2] CRAN (R 4.3.0)
    tidyselect      1.2.0      2022-10-10 [2] CRAN (R 4.3.0)
    timechange      0.2.0      2023-01-11 [1] CRAN (R 4.3.0)
    tmap            3.3-3      2022-03-02 [1] CRAN (R 4.3.0)
    tmaptools       3.1-1      2021-01-19 [1] CRAN (R 4.3.0)
    tweenr          2.0.2      2022-09-06 [1] CRAN (R 4.3.0)
    tzdb            0.4.0      2023-05-12 [1] CRAN (R 4.3.0)
    units           0.8-3      2023-08-10 [1] CRAN (R 4.3.0)
    urlchecker      1.0.1      2021-11-30 [2] CRAN (R 4.3.0)
    usethis         2.1.6      2022-05-25 [2] CRAN (R 4.3.0)
    utf8            1.2.4      2023-10-22 [1] CRAN (R 4.3.1)
    uuid            1.1-0      2022-04-19 [2] CRAN (R 4.3.0)
    vctrs           0.6.4      2023-10-12 [1] CRAN (R 4.3.1)
    viridis         0.6.4      2023-07-22 [1] CRAN (R 4.3.0)
    viridisLite     0.4.2      2023-05-02 [2] CRAN (R 4.3.0)
    vroom           1.6.4      2023-10-02 [1] CRAN (R 4.3.1)
    waffle          0.7.0      2017-01-07 [1] CRAN (R 4.3.0)
    webshot         0.5.5      2023-06-26 [1] CRAN (R 4.3.0)
    whisker         0.4.1      2022-12-05 [2] CRAN (R 4.3.0)
    withr           2.5.2      2023-10-30 [1] CRAN (R 4.3.1)
    wk              0.7.3      2023-05-06 [2] CRAN (R 4.3.0)
    worrms          0.4.3      2023-06-20 [1] CRAN (R 4.3.0)
    xfun            0.41       2023-11-01 [1] CRAN (R 4.3.1)
    XML             3.99-0.15  2023-11-02 [1] CRAN (R 4.3.1)
    xml2            1.3.5.9000 2023-11-29 [1] Github (r-lib/xml2@b9f65ba)
    xslt            1.4.4      2023-02-21 [1] CRAN (R 4.3.0)
    xtable          1.8-4      2019-04-21 [2] CRAN (R 4.3.0)
    xts             0.13.1     2023-04-16 [1] CRAN (R 4.3.0)
    yaml            2.3.7      2023-01-23 [2] CRAN (R 4.3.0)
    zen4R           0.9.9000   2023-11-03 [1] Github (eblondel/zen4R@f91c899)
    zip             2.3.0      2023-04-17 [2] CRAN (R 4.3.0)
    zoo             1.8-12     2023-04-13 [1] CRAN (R 4.3.0)

 [1] /Users/alessandrooggioni/Library/R/arm64/4.3/library
 [2] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library

 V ── Loaded and on-disk version mismatch.
 P ── Loaded and on-disk path mismatch.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@maelle
Copy link
Contributor

maelle commented Nov 30, 2023

is it correct that I should use the dev branch of ReLTER?

@maelle
Copy link
Contributor

maelle commented Nov 30, 2023

I can reproduce the error with the dev branch and the dev version of pkgdown 👀

@oggioniale
Copy link
Author

is it correct that I should use the dev branch of ReLTER?

yes it is correct

@oggioniale
Copy link
Author

I can reproduce the error with the dev branch and the dev version of pkgdown 👀

for the pkgdown I use v2.0.7 and not the dev one

@maelle
Copy link
Contributor

maelle commented Nov 30, 2023

thanks to @jonthegeek I see a package with a similar error on CRAN https://cran.r-project.org/web/checks/check_results_cwbtools.html

When is zen4R run in ReLTER exactly? At loading?

Does PolMine/cwbtools#50 ring any bell?

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

I tried running the build_home() function step by step from pkgdown source and it worked with no message. Then I ran it at once and it also worked with no message. I only see the librdf errors if I run the function from ReLTER.

# from ReLTER folder, errors
pkgdown::build_home()

# from another folder, no error
pkgdown::build_home("../ReLTER")

🤯

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

But by reverting the idea, loading the pkgdown function from the ReLTER folder, I see the error comes from render_page(). I'll continue investigating.

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

The error is at xml2::read_html(rendered, encoding = "UTF-8")

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

the problem comes from having nested p in <p><p>Developed by Alessandro Oggioni, Micha Silver, Paolo Tagliolato, Luigi Ranghetti.</p></p>

@maelle

This comment was marked as outdated.

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

Closing as it's not a rotemplate bug. 😸

@maelle maelle closed this as completed Dec 1, 2023
@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

wait maybe it wasn't even the navbar? I'm a bit lost.

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

still not sure what the issue is!

r-lib/pkgdown#2381

r-lib/xml2#427

@oggioniale
Copy link
Author

wait maybe it wasn't even the navbar? I'm a bit lost.

it isn't because I change the _pkgdown.yaml file like this:

navbar:
  structure:
    left: [reference,articles, news]
    right: [github]

and the librdf error reappears.

@maelle
Copy link
Contributor

maelle commented Dec 1, 2023

yes I noticed that. Maybe I'll hear more from the two aforementioned issues I opened elsewhere. It's really a mystery. Now if the examples and vignettes are fixed, doesn't the website build ok despite the librdf errors?

@ablaette
Copy link

You might want to check whether the HTML is valid (can be parsed as XML). After struggling a while with a warnings I see when parsing a website I retrieve from Zenodo, I realized that the same warnings are issued, when I safe the page locally, and run the xmllint command line tool on it.

When I manually edited the html, I successively got rid of the warnings. So there is an invalidity of the HTML document, and the HTML should be changed.

See: PolMine/cwbtools#70

@maelle
Copy link
Contributor

maelle commented May 3, 2024

relevant issue: r-lib/pkgdown#2369

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

3 participants