CredibilityLab / groundhog

Reproducible R Scripts Via Date Controlled Installing & Loading of CRAN & Git Packages
https://groundhogr.com/
GNU General Public License v3.0
78 stars 4 forks source link

error cannot download any files #112

Open btojenniferborder opened 8 months ago

btojenniferborder commented 8 months ago

HI,

This package was working for me but now i'm getting the following error message:

groundhog.library(c("glmmTMB", "Matrix", "lme4"), "2022-05-14") Will now download 2 packages from GRAN The 2 packages will be downloaded simultaneously in a single batch http://gran.groundhogr.com/windows/4.2/2022-05-06/lme4_1.1-29.zip http://gran.groundhogr.com/windows/4.2/2022-05-06/Matrix_1.4-1.zip Error in utils::download.file(url.split[[bk]], zip.split[[bk]], quiet = TRUE, : cannot download any files Error in if (size_in_bytes < 1024) { : missing value where TRUE/FALSE needed

I can't find any information on how to solve this, any ideas?

Thanks!

urisohn commented 8 months ago

Can you check whether those URLs work on your browser? http://gran.groundhogr.com/windows/4.2/2022-05-06/lme4_1.1-29.zip

The server may be blocking your IP. So, this may be a useful first thing to rule out/in/

btojenniferborder commented 8 months ago

Ah yes, it says it's blocked. Any idea how I get round this?

On Tue, 23 Jan 2024 at 11:15, Uri Simonsohn @.***> wrote:

Can you check whether those URLs work on your browser? http://gran.groundhogr.com/windows/4.2/2022-05-06/lme4_1.1-29.zip

The server may be blocking your IP. So, this may be a useful first thing to rule out/in/

— Reply to this email directly, view it on GitHub https://github.com/CredibilityLab/groundhog/issues/112#issuecomment-1905824124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPNFIJW7T62INMZJBIPDPLYP6LU5AVCNFSM6AAAAABCGY76GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBVHAZDIMJSGQ . You are receiving this because you authored the thread.Message ID: @.***>

--

Dr Jennifer Border (*née* Taylor) Senior Research Ecologist

British Trust for Ornithology, The Nunnery, Thetford, Norfolk IP24 2PU Tel: +44 (0) 1842 750050 Fax: +44 (0) 1842 750030 Email: jennifer.border @bto.org @.***>

Registered Charity Number 216652 (England & Wales), SC039193 (Scotland). Company Limited by Guarantee Number 357284 (England and Wales).

urisohn commented 8 months ago

Option 1. use option force.source=TRUE, it will download from CRAN, but be slower Option 2. turn on a VPN if you have one.

Will look into why the GRAN server may be blocking your IP

urisohn commented 8 months ago

(i am revising groundhog and will include a more elegant error message when it fails to connect)

btojenniferborder commented 8 months ago

Ah it still failed for lme4 and glmmTMB:

Batch 2 of 2 has 1 packages. It is: lme4_1.1-29 As of 11:52 this batch is expected to finish installing by 11:53 (but these are noisy estimates).

You can keep trak of installation progress and expected completion time opening this real-time updated text file: C:\Users\jennifer.border\Documents\R_groundhog\groundhog_library\install_progress.txt


trying URL ' https://cran.rstudio.com//src/contrib/Archive/lme4/lme4_1.1-29.tar.gz' Content type 'application/x-gzip' length 3306026 bytes (3.2 MB) downloaded 3.2 MB

-I"C:/Users/jennifer.border/Documents/R/win-library/4.2/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c external.cpp -o external.o In file included from predModule.h:13, from external.cpp:8: lme4CholmodDecomposition.h:20:72: error: expected template-name before '<' token 20 class lme4CholmodDecomposition : public Eigen::CholmodDecomposition<_MatrixType, _UpLo> {

^ lme4CholmodDecomposition.h:20:72: error: expected '{' before '<' token In file included from predModule.h:13, from external.cpp:8: lme4CholmodDecomposition.h: In function 'SEXPREC lme4::Eigen_cholmod_wrap(const lme4::lme4CholmodDecomposition<Eigen::SparseMatrix >&)': lme4CholmodDecomposition.h:77:15: error: 'cholmod_factor' does not name a type 77 | const cholmod_factor f = obj.factor(); | ^~~~~~ lme4CholmodDecomposition.h:78:13: error: 'f' was not declared in this scope 78 | if (f->minor < f->n) | ^ lme4CholmodDecomposition.h:82:36: error: 'f' was not declared in this scope 82 | ::Rcpp::S4 ans(std::string(f->is_super ? "dCHMsuper" : "dCHMsimpl")); | ^ In file included from external.cpp:8: predModule.h: At global scope: predModule.h:40:23: error: field 'd_L' has incomplete type 'lme4::merPredD::ChmDecomp' {aka 'lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >'} 40 | ChmDecomp d_L; | ^~~ In file included from predModule.h:13, from external.cpp:8: lme4CholmodDecomposition.h:20:11: note: declaration of 'lme4::merPredD::ChmDecomp' {aka 'class lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >'} 20 | class lme4CholmodDecomposition : public Eigen::CholmodDecomposition<_MatrixType, _UpLo> { | ^~~~~~~~ external.cpp: In function 'SEXPREC glmerAGQ(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)': external.cpp:437:18: error: invalid use of incomplete type 'const ChmDecomp' {aka 'const class lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >'} 437 | if (pp->L().factor()->nzmax != q) | ~^~ In file included from predModule.h:13, from external.cpp:8: lme4CholmodDecomposition.h:20:11: note: declaration of 'lme4::merPredD::ChmDecomp' {aka 'class lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >'} 20 | class lme4CholmodDecomposition : public Eigen::CholmodDecomposition<_MatrixType, _UpLo> { | ^~~~~~~~ external.cpp:439:49: error: invalid use of incomplete type 'const ChmDecomp' {aka 'const class lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >'} 439 | const Ar1 sd(MAr1((double)pp->L().factor()->x, q).inverse()); | ~^~ In file included from predModule.h:13, from external.cpp:8: lme4CholmodDecomposition.h:20:11: note: declaration of 'lme4::merPredD::ChmDecomp' {aka 'class lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >'} 20 | class lme4CholmodDecomposition : public Eigen::CholmodDecomposition<_MatrixType, _UpLo> { | ^~~~~~~~ make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:259: external.o] Error 1 ERROR: compilation failed for package 'lme4'

The following package(s) from this batch failed to install: 'lme4_1.1-29'

Possible solutions: 1) First, simply try again, the error may be a fluke. 2) Inspect console log, you could be missing non-CRAN dependencies (e.g., RTools for Windows, XQuartz for Mac, libssl for Ubuntu), or have a connection problem, or another compatibility problem. 3) If the error indicates that a dependency is missing, re-run the groundhog.library() call with option force.install=TRUE 4) If the package that failed is a dependency for a package you want, you may install another version of that failed dependency directly with a groundhog.library() call, just for that failing pkg, for a different date. Then re-run this groundhog.library() call adding the ignore.deps argument, to allowing the version mismatch for that pkg. Use toc(<pkg>) to find out version release dates of 'pkg'. 5) Similar to (4), use toc() to find the date for the next version of the failing pkg and use a date after it for this entire groundhog.library() call. 6) Visit http://groundhogr.com/troubleshooting

              --   Installation Failed   --

Warning message: In utils::install.packages(snowball.k_source$source_url, repos = NULL, : installation of package ‘C:/Users/JENNIF~1.BOR/AppData/Local/Temp/RtmpETYsVr/downloaded_packages/lme4_1.1-29.tar.gz’ had non-zero exit status

On Tue, 23 Jan 2024 at 11:21, Uri Simonsohn @.***> wrote:

(i am revising groundhog and will include a more elegant error message when it fails to connect)

— Reply to this email directly, view it on GitHub https://github.com/CredibilityLab/groundhog/issues/112#issuecomment-1905832962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPNFIN43HZHTH7QJKVWG33YP6MKRAVCNFSM6AAAAABCGY76GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBVHAZTEOJWGI . You are receiving this because you authored the thread.Message ID: @.***>

--

Dr Jennifer Border (*née* Taylor) Senior Research Ecologist

British Trust for Ornithology, The Nunnery, Thetford, Norfolk IP24 2PU Tel: +44 (0) 1842 750050 Fax: +44 (0) 1842 750030 Email: jennifer.border @bto.org @.***>

Registered Charity Number 216652 (England & Wales), SC039193 (Scotland). Company Limited by Guarantee Number 357284 (England and Wales).

urisohn commented 8 months ago

Based on the console output the failure is unrelated to groundhog, just a problem compiling it in your computer (most likelyi it would fail not with groundhog (i.e., installing with install.packages(), from source) too). If you don't have a VPN, you could use your phone as a hotspot and install from there (it will be a few MB of traffic only); i haven't yet looked at why the IP may be blocked by the GRAN server

urisohn commented 8 months ago

i got in contact with support for the hosting company that hosts the GRAN database, they indicate that they do not blog IP addresses; one possibility they suggested is that you have a firewall that is preventing access to it. Does that sound plausible?

btojenniferborder commented 8 months ago

H, Thanks for checking. Yes that's definitely possible. I was accessing through my work VPN and there are definitely various different security measures in place on their computer systems. It's not an easy one to get round though as they won't take down the security measures just for me and I can't access through my home laptop as I don't have enough room to store all the data files I use on there.

On Fri, 26 Jan 2024 at 08:30, Uri Simonsohn @.***> wrote:

i got in contact with support for the hosting company that hosts the GRAN database, they indicate that they do not blog IP addresses; one possibility they suggested is that you have a firewall that is preventing access to it. Does that sound plausible?

— Reply to this email directly, view it on GitHub https://github.com/CredibilityLab/groundhog/issues/112#issuecomment-1911663725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPNFIJDQOPEDXTBNAYUTCLYQNSRRAVCNFSM6AAAAABCGY76GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGY3DGNZSGU . You are receiving this because you authored the thread.Message ID: @.***>

--

Dr Jennifer Border (*née* Taylor) Senior Research Ecologist

British Trust for Ornithology, The Nunnery, Thetford, Norfolk IP24 2PU Tel: +44 (0) 1842 750050 Fax: +44 (0) 1842 750030 Email: jennifer.border @bto.org @.***>

Registered Charity Number 216652 (England & Wales), SC039193 (Scotland). Company Limited by Guarantee Number 357284 (England and Wales).

urisohn commented 7 months ago

OK looking for way around this. I wonder if channeling the request through another server will do the trick.

From your browser, could you confirm that this URL still doesn't work for you, http://gran.groundhogr.com/windows/4.2/2022-05-06/lme4_1.1-29.zip

(I would expect it to still not work)

and check whether this alternative URL does work (it should lead to downloading the zip file) https://groundhogr.com/get_file.php?file=windows/4.2/2022-05-06/lme4_1.1-29.zip

urisohn commented 7 months ago

based on issue #113 i now think your issue may be related to GRAN having been an http rather than https site. That's been addressed, could you check if https://gran.groundhogr.com/windows/4.2/2022-05-06/lme4_1.1-29.zip works for you?

btojenniferborder commented 7 months ago

Hi,

Sorry for the lte reply, this got lost in my inbox. Both of those URL's work fine and so does the other one you sent.

Thanks! Jenni

On Sun, 28 Jan 2024 at 20:55, Uri Simonsohn @.***> wrote:

OK looking for way around this. I wonder if channeling the request through another server will do the trick.

From your browser, could you confirm that this URL still doesn't work for you, http://gran.groundhogr.com/windows/4.2/2022-05-06/lme4_1.1-29.zip

(I would expect it to still not work)

and check whether this alternative URL does work (it should lead to downloading the zip file)

https://groundhogr.com/get_file.php?file=windows/4.2/2022-05-06/lme4_1.1-29.zip

— Reply to this email directly, view it on GitHub https://github.com/CredibilityLab/groundhog/issues/112#issuecomment-1913719321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPNFIN2W5YQFX3CZ222QVDYQ23NVAVCNFSM6AAAAABCGY76GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTG4YTSMZSGE . You are receiving this because you authored the thread.Message ID: @.***>

--

Dr Jennifer Border (*née* Taylor) Senior Research Ecologist

British Trust for Ornithology, The Nunnery, Thetford, Norfolk IP24 2PU Tel: +44 (0) 1842 750050 Fax: +44 (0) 1842 750030 Email: jennifer.border @bto.org @.***>

Registered Charity Number 216652 (England & Wales), SC039193 (Scotland). Company Limited by Guarantee Number 357284 (England and Wales).