EDIorg / ecocomDP

A dataset design pattern and R package for ecological community data.
https://ediorg.github.io/ecocomDP/
Other
32 stars 13 forks source link

"401 unauthorized" http error #115

Closed taddallas closed 3 years ago

taddallas commented 3 years ago

Hopefully this is an easy fix (or an error on my part). Tried:

data_list <- ecocomDP::search_data("mammal")

and received

Error in load(url(objurl)) : 
  cannot open the connection to 'https://pasta.lternet.edu/package/data/eml/edi/759/13/e059c8d1c4fcd87d9546e4b3defa8727'
In addition: Warning message:
In load(url(objurl)) :
  cannot open URL 'https://pasta.lternet.edu/package/data/eml/edi/759/13/e059c8d1c4fcd87d9546e4b3defa8727': HTTP status was '401 Unauthorized'

sessionInfo below

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.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     

other attached packages:
[1] ecocomDP_1.1.0
clnsmth commented 3 years ago

Thanks for reporting this issue @taddallas. We're looking into it now.

clnsmth commented 3 years ago

We've got a fix for this issue @taddallas, but won't know it's efficacy until we deploy it to our repository system later tonight (~ 20:00 MT). I will post an update then.

clnsmth commented 3 years ago

This issue has been solved by removing 'libcurl' from the restricted list of user agents to the EDI Repository's robots.txt.

@taddallas, please confirm this result when you have a chance. Many thanks!

taddallas commented 3 years ago

Fixed on my machine! Thanks for this. :tada: