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

install from github failing but works with devtools #694

Closed
nick-youngblut opened this issue Mar 23, 2021 · 1 comment
Closed

install from github failing but works with devtools #694

nick-youngblut opened this issue Mar 23, 2021 · 1 comment

Comments

@nick-youngblut
Copy link

> renv::install("ruochenj/mbImpute/mbImpute R package")
Error: failed to resolve remote 'ruochenj/mbImpute/mbImpute R package' -- failed to retrieve 'https://api.github.com/repos/ruochenj/mbImpute/contents/mbImpute R package/DESCRIPTION?ref=53d52bdc546fc4d0742ed9ecafcbc3f9268803a1' [error code 22]
In addition: Warning message:
curl: (22) The requested URL returned error: 400
Traceback (most recent calls last):
14: renv::install("ruochenj/mbImpute/mbImpute R package")
13: lapply(remotes, renv_remotes_resolve)
12: FUN(X[[i]], ...)
11: withCallingHandlers(renv_remotes_resolve_impl(entry, latest),
        error = error)
10: renv_remotes_resolve_impl(entry, latest)
 9: renv_remotes_resolve_github(parsed)
 8: renv_remotes_resolve_github_description(host, user, repo, subdir,
        sha)
 7: download(url, destfile = jsonfile, type = "github", quiet = TRUE)
 6: renv_download_error(url, "error code %i", status)
 5: stopf("failed to retrieve '%s' [%s]", url, msg, call. = FALSE)
 4: stop(sprintf(fmt, ...), call. = call.)
 3: .handleSimpleError(function (e)
    {
        ...
    }, "failed to retrieve 'https://api.github.com/repos/ruochenj/mbImpute/contents/mbImpute R package/DESCRIPTION?ref=53d52bdc546fc4d0742ed9ecafcbc3f9268803a1' [error code 22]",
        base::quote(NULL))
 2: h(simpleError(msg, call))
 1: stop(simpleError(message = message, call = e$call))

However, devtools::install_github() works fine:

> devtools::install_github("ruochenj/mbImpute/mbImpute R package")
Downloading GitHub repo ruochenj/mbImpute@HEAD
Installing 1 packages: doParallel
trying URL 'https://cloud.r-project.org/src/contrib/doParallel_1.0.16.tar.gz'
Content type 'application/x-gzip' length 37121 bytes (36 KB)
==================================================
downloaded 36 KB

* installing *source* package ‘doParallel’ ...
** package ‘doParallel’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (doParallel)

The downloaded source packages are in
	‘/tmp/RtmphBGn0w/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
✔  checking for file ‘/tmp/RtmphBGn0w/remotes32fc71fa95aa/ruochenj-mbImpute-53d52bd/mbImpute R package/DESCRIPTION’ (354ms)
─  preparing ‘mbImpute’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
     NB: this package now depends on R (>= 3.5.0)
     WARNING: Added dependency on R >= 3.5.0 because serialized objects in  serialize/load version 3 cannot be read in older versions of R.  File(s) containing such objects:  ‘mbImpute/vignettes/dat_sim_add_filter_coef.rds’  WARNING: Added dependency on R >= 3.5.0 because serialized objects in  serialize/load version 3 cannot be read in older versions of R.  File(s) containing such objects:  ‘mbImpute/vignettes/imputed_mat_condition_as_covariate.rds’
─  building ‘mbImpute_0.1.0.tar.gz’

* installing *source* package ‘mbImpute’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (mbImpute)

sessionInfo:

R version 4.0.3 (2020-10-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS/LAPACK: /ebio/abt3_projects/Anxiety_Twins_Metagenomes/envs/tidyverse-clr/lib/libopenblasp-r0.3.12.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_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

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13   magrittr_2.0.1    usethis_2.0.1     devtools_2.3.2
 [5] pkgload_1.2.0     R6_2.5.0          rlang_0.4.10      fastmap_1.1.0
 [9] tools_4.0.3       pkgbuild_1.2.0    sessioninfo_1.1.1 cli_2.3.1
[13] withr_2.4.1       ellipsis_0.3.1    remotes_2.2.0     assertthat_0.2.1
[17] rprojroot_2.0.2   lifecycle_1.0.0   crayon_1.4.1      processx_3.4.5
[21] purrr_0.3.4       callr_3.5.1       fs_1.5.0          ps_1.6.0
[25] curl_4.3          testthat_3.0.2    memoise_2.0.0     glue_1.4.2
[29] cachem_1.0.4      compiler_4.0.3    desc_1.3.0        prettyunits_1.1.1
[33] renv_0.13.1
@kevinushey
Copy link
Collaborator

Thanks for the bug report! Should now be fixed in the development version of renv.

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

2 participants