Re: [Bioc-devel] rfaRm suddenly failing on all platforms

2021-03-14 Thread Hervé Pagès

Hi Lara,

When you're trying to reproduce an error that you see on the build 
system, it's important that you make sure that you're using the latest 
version of all CRAN and Bioconductor packages. You can use 
BiocManager::valid() for that:


  > library(BiocManager)
  Bioconductor version 3.12 (BiocManager 1.30.10), 
?BiocManager::install for help

  > valid()
  [1] TRUE

With this, I can reproduce the rfaRm error on my laptop. It occurs in 
the rfamGetClanDefinitions() function which is called at installation 
time to initialize the 'rfamClanDefinitions' internal variable. The 
error can be reproduced with:


  library(xml2)
  library(rvest)
  rfamClanLookUpURL <- 'http://rfam.xfam.org/clan/'
  rfamClansListURL <- "http://rfam.xfam.org/clans;
  clanHTMLTable <- html_table(xml_find_all(read_html(rfamClansListURL), 
"//table[@id]"))

  clanAccessions <- clanHTMLTable[[1]][,3]
  for (clan in clanAccessions) {
  read_html(paste(rfamClanLookUpURL, clan, sep=""))
  }
  # Error: `x` must be a string of length 1

See my sessionInfo() below.

Note that CRAN package rvest got recently update (on March 9) from 
version 0.3.6 to 1.0.0 (see https://cran.r-project.org/package=rvest) 
and I suspect that the above error might be related to a change in the 
rvest::html_table() function.


Finally I would advice against accessing remote resources to initialize 
an internal variable at installation time like you do with for 
'rfamClanDefinitions'. Better do it at **load time** with something like 
this:


  1. Replace

  rfamClanDefinitions <- rfamGetClanDefinitions()

 with

  rfamClanDefinitions <- NULL

  2. Create a zzz.R file and add the following onLoad hook to it:

 .onLoad <- function(libname, pkgname)
 {
rfamClanDefinitions <<- rfamGetClanDefinitions()
 }

Hope this helps,

H.


R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.10

Matrix products: default
BLAS:   /home/hpages/R/R-4.0.3/lib/libRblas.so
LAPACK: /home/hpages/R/R-4.0.3/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] rvest_1.0.0 xml2_1.3.2

loaded via a namespace (and not attached):
 [1] httr_1.4.2  compiler_4.0.3  ellipsis_0.3.1  magrittr_2.0.1
 [5] R6_2.5.0pillar_1.5.1tibble_3.1.0curl_4.3
 [9] crayon_1.4.1utf8_1.2.1  fansi_0.4.2 vctrs_0.3.6
[13] lifecycle_1.0.0 pkgconfig_2.0.3 rlang_0.4.10


On 3/13/21 3:47 AM, Selles Vidal, Lara wrote:

Dear all,

I have recently observed that my package rfaRm started failing at INSTALL step 
on all platforms 
(http://bioconductor.org/checkResults/release/bioc-LATEST/rfaRm/ ).

In all cases, the error is the same and occurs both in release and devel:


Error : `x` must be a string of length 1

Error: unable to load R code in package �rfaRm�

This is quite puzzling, since we have not pushed any changes recently. 
Additionally, I have confirmed I can install rfaRm with no problem through 
standard procedure from Bioconductor.

Does anyone have any idea what could be possible happening?

Thanks a lot in advance.

Best wishes,

Lara



Lara Selles
lara.selle...@imperial.ac.uk








[[alternative HTML version deleted]]


___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



--
Hervé Pagès

Bioconductor Core Team
hpages.on.git...@gmail.com

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] rfaRm suddenly failing on all platforms

2021-03-13 Thread Selles Vidal, Lara
Dear all,

I have recently observed that my package rfaRm started failing at INSTALL step 
on all platforms 
(http://bioconductor.org/checkResults/release/bioc-LATEST/rfaRm/ ).

In all cases, the error is the same and occurs both in release and devel:


Error : `x` must be a string of length 1

Error: unable to load R code in package �rfaRm�

This is quite puzzling, since we have not pushed any changes recently. 
Additionally, I have confirmed I can install rfaRm with no problem through 
standard procedure from Bioconductor.

Does anyone have any idea what could be possible happening?

Thanks a lot in advance.

Best wishes,

Lara



Lara Selles
lara.selle...@imperial.ac.uk








[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel