Closed CharlyMarie closed 2 years ago
Have not seen this before. I am surprised that you would simultaneously have issues connecting to the file online and also locally in your computer. Few things to try, feel free to combine as appropriate.
Silly but sometimes it works: restarting the computer...
Directly ask for the database to be updated groundhog:::load.cran.toc(TRUE)
(yes, that's three ::: not the usual two ::)
Set another folder as your groundhog folder, one you know you have permissions to make changes to.
set.groundhog.folder(<new path>)
Then try again to load the package.
Try downloading the file with R from a script, see what output it generates, so running something like:
utils::download.file('https://groundhogr.com/cran.toc.rds', 'c:/temp/TEST_cran.toc.rds')
modifying the 'c:/temp' to make sure it exists and that you have permission to save there
Download the cran.toc.rds file with your browser (or with step 4 above it if works), save it somewhere in your computer. Then try to read it with R.
Something liketest_cran.toc <- readRDS('c:/temp/TEST_cran.toc.rds')
Let's see if one of these leads us to the root cause.
Thanks !
I tried :
OK. Can you tell me a bit more about 4? Do you mean that after saving it, when you try to run groundhog it still outputs: cannot open compressed file 'C:/Users/icma9270/Documents/R_groundhog/groundhog_library//cran.toc.rds',?
Can you try the following things:
Run an older version of groundhog:
meta.groundhog('2022-06-01')
then load any pkg, for instance
groundhog.library('pwr','2022-06-01')
Try reading the rds file you downloaded with utils:: outside of groundhog, so just do
cran.toc<-readRDS("C:/Users/icma9270/Documents/R_groundhog/groundhog_library//cran.toc.rds")
Can you tell me which versions of R, R Studio and Windows you are using?
Thank you
ps: after replying and re-reading your message, I guess you tried the equivalent of 7 already, and you do successfully read the file into R?
Thanks for the help !
After trying all of those options, it appeared that R could not access any repository through GroundHog (CRAN, the groundhog website...). I disabled my VPN, which is otherwise automatically loaded, and managed to load the packages with Groundhog.
Many thanks, hope it will be helpful for other people !
OK, glad it is resolved. To try to make groundhog robust to this issue, do you mind sharing which VPN you were using?
Sure ! It is Pulse Secure : https://www.pulsesecure.net/
Thanks!
Dear all :)
First, thanks for the great package !
After installing and loading GroundHog, I wrap my packages like this : load.lib <- c('dplyr', 'tidyr')
I then call groundhog.library(load.lib, '2022-07-01') and get that response :
_groundhog says: The date you entered, '2022-07-01' requires updating your local database with the list of all CRAN package-versions (cran.toc.rds) trying URL 'https://groundhogR.com/cran.toc.rds' Error in utils::download.file(paste0(groundhogR.url, rdsk), file.path(gf, : cannot open URL 'https://groundhogR.com/cran.toc.rds' In addition: Warning message: In utils::download.file(paste0(groundhogR.url, rdsk), file.path(gf, : URL 'https://groundhogR.com/cran.toc.rds': status was 'Couldn't resolve host name' trying URL 'https://s3.wasabisys.com/groundhog/cran.toc.rds' Error in utils::download.file(paste0(wasabi.url, rdsk), file.path(gf, : cannot open URL 'https://s3.wasabisys.com/groundhog/cran.toc.rds' In addition: Warning message: In utils::download.file(paste0(wasabi.url, rdsk), file.path(gf, : URL 'https://s3.wasabisys.com/groundhog/cran.toc.rds': status was 'Couldn't resolve host name' Error in load.cran.toc(TRUE) : Error. Groundhog says: could not download "cran.toc.rds' Error in gzfile(file, "rb") : cannot open the connection In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file 'C:/Users/icma9270/Documents/R_groundhog/groundhoglibrary//cran.toc.rds', probable reason 'No such file or directory'
I tried to manually access the URL https://groundhogR.com/cran.toc.rds and copy-paste the file in the right folder. I do manage to do so, but R seems to erase the file each time I run the code. Which brings me back to the same problem : _cannot open compressed file 'C:/Users/icma9270/Documents/R_groundhog/groundhoglibrary//cran.toc.rds', probable reason 'No such file or directory'
Has any of you been there ?
Thanks for the help :)