[R-pkg-team] Bug#942476: r-cran-dt: missing css files and bad path for javascript files
Vincent Danjean
vdanjean at debian.org
Wed Oct 16 23:45:56 BST 2019
Package: r-cran-dt
Version: 0.9+dfsg-1
Severity: normal
Hi,
I'm trying to use r-cran-dt to generate a report. The Debian
package has problems (see the script at the end to reproduce
the issue):
- one css file is missing:
$ Rscript -e "rmarkdown::render('small_test.rmd')"
[...]
/usr/bin/pandoc +RTS -K512m -RTS small_test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output small_test.html --email-obfuscation none --self-contained --standalone --section-divs --template /usr/lib/R/site-library/rmarkdown/rmd/h/default.html --highlight-style tango --css style.css --variable 'theme:cerulean' --include-in-header /tmp/RtmpDhs6QV/rmarkdown-str692d16ebe87a.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/latex-div.lua
pandoc: /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/css/jquery.dataTables.extra.css: openBinaryFile: does not exist (No such file or directory)
Erreur : pandoc document conversion failed with error 1
Exécution arrêtée
Indeed, jquery.dataTables.extra.css is removed from the Debian r-cran-dt package,
however, according to apt-file and https://pacakages.debian.org,
no Debian package is providing this file.
Continuing with
$ sudo touch /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/css/jquery.dataTables.extra.css
to workaround this problem
- one javascript file is not in the expected path:
$ Rscript -e "rmarkdown::render('small_test.rmd')"
[...]
/usr/bin/pandoc +RTS -K512m -RTS small_test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output small_test.html --email-obfuscation none --self-contained --standalone --section-divs --template /usr/lib/R/site-library/rmarkdown/rmd/h/default.html --highlight-style tango --css style.css --variable 'theme:cerulean' --include-in-header /tmp/RtmpI2EroN/rmarkdown-str6bbf3216f5ad.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/latex-div.lua
pandoc: /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/js/jquery.dataTables.min.js: openBinaryFile: does not exist (No such file or directory)
Erreur : pandoc document conversion failed with error 1
Exécution arrêtée
Indeed, the javascript file is in
/usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/js/jquery.dataTables.min.js
and not
/usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/jquery.dataTables.min.js
Continuing with
$ sudo ln -s . /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/js
to workarround the problem
- another javascript file is still not in the expected place:
Rscript -e "rmarkdown::render('small_test.rmd')"
[...]
/usr/bin/pandoc +RTS -K512m -RTS small_test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output small_test.html --email-obfuscation none --self-contained --standalone --section-divs --template /usr/lib/R/site-library/rmarkdown/rmd/h/default.html --highlight-style tango --css style.css --variable 'theme:cerulean' --include-in-header /tmp/RtmpS0d9gK/rmarkdown-str6e161233a5ca.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/latex-div.lua
pandoc: /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/jszip.min.js: openBinaryFile: does not exist (No such file or directory)
Erreur : pandoc document conversion failed with error 1
Exécution arrêtée
dpkg -S tells me that this file is (on Debian system) in
libjs-jquery-datatables-extensions: /usr/share/javascript/jquery-datatables-extensions/JSZip/jszip.min.js
(with a copy in 3 others packages on my machine)
Continuing with
$ sudo ln -s /usr/share/javascript/jquery-datatables-extensions/JSZip/jszip.min.js /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/jszip.min.js
to workarround the problem
- another javascript file is still not in the expected place:
Rscript -e "rmarkdown::render('small_test.rmd')"
[...]
/usr/bin/pandoc +RTS -K512m -RTS small_test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output small_test.html --email-obfuscation none --self-contained --standalone --section-divs --template /usr/lib/R/site-library/rmarkdown/rmd/h/default.html --highlight-style tango --css style.css --variable 'theme:cerulean' --include-in-header /tmp/RtmpMKo2nV/rmarkdown-str6e7f218627e7.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/latex-div.lua
pandoc: /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/pdfmake.min.js: openBinaryFile: does not exist (No such file or directory)
Erreur : pandoc document conversion failed with error 1
Exécution arrêtée
dpkg -S tells me that this file is (on Debian system) in
libjs-jquery-datatables-extensions: /usr/share/javascript/jquery-datatables-extensions/pdfmake/build/pdfmake.min.js
Continuing with
$ sudo ln -s /usr/share/javascript/jquery-datatables-extensions/pdfmake/build/pdfmake.min.js /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/pdfmake.min.js
- another javascript file is missing (vfs_fonts.js)
and does not seem to be available in Debian
$ Rscript -e "rmarkdown::render('small_test.rmd')"
[...]
/usr/bin/pandoc +RTS -K512m -RTS small_test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output small_test.html --email-obfuscation none --self-contained --standalone --section-divs --template /usr/lib/R/site-library/rmarkdown/rmd/h/default.html --highlight-style tango --css style.css --variable 'theme:cerulean' --include-in-header /tmp/RtmpiA4YrW/rmarkdown-str6ed3608bac42.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/latex-div.lua
pandoc: /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/vfs_fonts.js: openBinaryFile: does not exist (No such file or directory)
Erreur : pandoc document conversion failed with error 1
Exécution arrêtée
Continuing with
$ sudo touch /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/vfs_fonts.js
Eventually the html document is generated.
So, it seems to me that:
- some files are removed from the r-cran-dt source packages whereas they are
not provided by any other Debian packages (at least jquery.dataTables.extra.css
and vfs_fonts.js)
- some files are not available in the expected path (through symlinks),
at least jquery.dataTables.min.js, jszip.min.js and pdfmake.min.js
Note that removing all workarounds:
$ sudo rm /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/css/jquery.dataTables.extra.css /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables/js /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/jszip.min.js /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/pdfmake.min.js /usr/lib/R/site-library/DT/htmlwidgets/lib/datatables-extensions/Buttons/js/vfs_fonts.js
and installing locally the DT package (install.packages('DT') from R)
makes the script working. So the bugs come from the packaging.
Regards,
Vincent
PS: in attachment, the Rcmd script file and the data file to reproduce this bug
-- System Information:
Debian Release: bullseye/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel, mipsel
Kernel: Linux 5.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages r-cran-dt depends on:
ii libjs-jquery 3.3.1~dfsg-3
ii libjs-jquery-datatables 1.10.20+dfsg-1
ii libjs-jquery-datatables-extensions 0.0+20150910+dfsg-2
ii libjs-jquery-selectize.js 0.12.6+dfsg-1
ii r-base-core [r-api-3.5] 3.6.1-6
ii r-cran-crosstalk 1.0.0+dfsg-4
ii r-cran-htmltools 0.4.0-1
ii r-cran-htmlwidgets 1.5+dfsg-1
ii r-cran-jsonlite 1.6+dfsg-1
ii r-cran-magrittr 1.5-5
ii r-cran-promises 1.1.0-1
Versions of packages r-cran-dt recommends:
ii r-cran-knitr 1.25+dfsg-1
ii r-cran-rmarkdown 1.16+dfsg-1
Versions of packages r-cran-dt suggests:
ii r-cran-shiny 1.3.2+dfsg-1
-- no debconf information
-------------- next part --------------
---
title: "Test"
author: "Cellule de Bioinformatique"
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
html_document:
theme: cerulean
highlight: tango
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(dplyr)
library(tidyr)
library(DT)
```
# Métriques de séquençage
```{r metrics, echo=FALSE}
Identitovigilance = read.delim("Identitovigilance.tsv", header=TRUE)
Identitovigilance %>%
datatable(extensions = 'Buttons', options = list(dom = 'Bfrtip',buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),pageLength=10, scrollX='400px', columnDefs = list(list(className = 'dt-center', targets = "_all"))),rownames = FALSE)
```
-------------- next part --------------
Echantillon Sexe Couv. autosomes Couv. chrX
NAN094 H 44.2339823740566 22.0109940293309
NAQ095 F 45.6972749039199 45.2938556050553
NAQ102 H 46.4503791247102 23.3367492729385
NAQ104 F 42.6604621137042 41.59214873412
NAQ114 H 47.4454524288081 23.2806965771802
NAQ115 H 45.3128157396608 22.5878060713352
NAQ116 H 44.5120151092971 22.1902206625124
NAQ117 H 44.5667556457501 22.3253287035313
NAQ124 H 44.1547140407541 22.0612210097021
NAQ127 H 45.1406368058383 22.5020949697436
NAQ131 H 45.1472097072126 22.4443120795604
NAQ133 F 41.2195065918166 40.9188784430404
NAQ141 F 42.749084378469 43.7119043619277
NAR013 H 43.5951059938956 21.9606501487595
NAR018 H 45.3550866503083 22.3055364037361
NAR019 H 45.4337543537171 22.9515217254307
NAR028 F 38.4230276904003 37.9964613205878
NAR032 F 44.0734609415596 44.4685709835858
NAR041 F 43.9393289823221 42.9609225995391
NAR046 F 44.1486633776115 43.7450775977989
NAR047 H 43.3750988313457 22.4532127447165
NAR048 F 39.6169267993457 40.7340405197216
NAR053 F 43.2499594551444 42.0961465556751
NAR059 H 41.6948703311421 21.9658016456802
More information about the R-pkg-team
mailing list