Joe-Heffer-Shef / FAIR4RS-Documentation

This is a course on software documentation for researchers developed by the Research Software Engineering team and IT Services at the University of Sheffield.
https://joe-heffer-shef.github.io/FAIR4RS-Documentation/
Other
0 stars 1 forks source link

Sandpaper Error: fatal problem(s) in xsltParseStylesheetDoc #8

Open Joe-Heffer-Shef opened 1 month ago

Joe-Heffer-Shef commented 1 month ago

R output:

> sandpaper::build_lesson()
xslt error: compilation error: file C:/Users/my_username/AppData/Local/Temp/RtmpQbZTVe/file57c5e6b75d3 line 10 element import
xslt error: xsl:import : unable to load C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl
Error: fatal problem(s) in xsltParseStylesheetDoc: xsl:import : unable to load C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl
In addition: Warning message:
In doc_xslt_apply(doc$doc, stylesheet$doc, paramstr) :
  failed to load external entity "C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl" [1549]

sandpaper::serve()

> sandpaper::build_lesson()
xslt error: compilation error: file C:/Users/my_username/AppData/Local/Temp/RtmpuA4vOL/file213f8584d25c5 line 10 element import
xslt error: xsl:import : unable to load C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl
Error: fatal problem(s) in xsltParseStylesheetDoc: xsl:import : unable to load C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl
In addition: Warning message:
In doc_xslt_apply(doc$doc, stylesheet$doc, paramstr) :
  failed to load external entity "C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl" [1549]

session info

> sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8    LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.utf8    

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.4.0    renv_1.0.3        Rcpp_1.0.11       xml2_1.3.5        tinkr_0.2.0.9000  assertthat_0.2.1 
 [7] callr_3.7.3       credentials_2.0.1 yaml_2.3.7        fastmap_1.1.1     R6_2.5.1          commonmark_1.9.0 
[13] pegboard_0.7.5    knitr_1.43        tibble_3.2.1      rprojroot_2.0.3   openssl_2.1.0     pillar_1.9.0     
[19] rlang_1.1.1       utf8_1.2.3        xfun_0.40         fs_1.6.3          sys_3.4.2         cli_3.6.1        
[25] withr_2.5.0       magrittr_2.0.3    ps_1.7.5          digest_0.6.33     processx_3.8.2    rstudioapi_0.15.0
[31] sandpaper_0.16.4  askpass_1.2.0     gert_1.9.3        lifecycle_1.0.3   vctrs_0.6.3       evaluate_0.21    
[37] glue_1.6.2        whisker_0.4.1     xslt_1.4.5        fansi_1.0.4       rmarkdown_2.24    purrr_1.0.2      
[43] tools_4.4.0       pkgconfig_2.0.3   htmltools_0.5.6 
Joe-Heffer-Shef commented 3 weeks ago

Tried reinstalling tinkr to no avail

> renv::install("tinkr")
> packageVersion("tinkr")
[1] ‘0.2.0’
> sandpaper::build_lesson()
xslt error: compilation error: file C:/Users/my_username/AppData/Local/Temp/Rtmpag6R0S/file34c466a13f52 line 10 element import
xslt error: xsl:import : unable to load C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl
Error: fatal problem(s) in xsltParseStylesheetDoc: xsl:import : unable to load C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl
In addition: Warning message:
In doc_xslt_apply(doc$doc, stylesheet$doc, paramstr) :
  failed to load external entity "C://stfdata09/home/CS/my_username/ManWin/My%20Documents/R/win-library/4.2.1/tinkr/stylesheets/xml2md_gfm.xsl" [1549]
tdjames1 commented 3 weeks ago

Hi @Joe-Heffer-Shef, we has a similar issue for @RicCampbell which appeared to be a problem with trying to access the library files on a shared drive on Windows. Here's the workaround that we used to resolve it:

Create a directory on local storage e.g.

C:\Users\cm1rjcx\Rpackages

Edit ~/.Renviron - if you have usethis installed you should be able to do:

usethis::edit_r_environ()

Add this line:

R_LIBS_USER="C:\Users\cm1rjcx\Rpackages"

Save file and restart R.

You'll have to start again with installing packages i.e.

Install the template packages to your R library

install.packages(c("sandpaper", "varnish", "pegboard", "tinkr"))

Then try testing the installation again...

tdjames1 commented 3 weeks ago

Also logged as an issue here: https://github.com/carpentries/sandpaper-docs/issues/191