PoisotLab / SimpleSDMLayers.jl

Simple layers for species distribution modeling and bioclimatic data
https://docs.ecojulia.org/SimpleSDMLayers.jl/stable/
MIT License
19 stars 2 forks source link

JOSS: Downloading data for examples #41

Closed marcjwilliams1 closed 3 years ago

marcjwilliams1 commented 3 years ago

This is related to openjournals/joss-reviews#2872.

So I've managed to install the package, but running through some of the examples in the docs I get this error. Do you have any idea what might be going? Something on my end or something wrong with the site?


julia> precipitation = worldclim(12)
[ Info: Downloading wc2.0_bio10m.zip
ERROR: HTTP.ExceptionRequest.StatusError(404, "GET", "/data/worldclim/v2.0/tif/base/wc2.0_10m_bio.zip", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Date: Thu, 17 Dec 2020 17:42:41 GMT
Server: Apache/2.4.18 (Ubuntu)
Last-Modified: Mon, 12 Oct 2020 23:20:08 GMT
ETag: "df-5b1818a0b093c;5b18143b1d0ec"
Accept-Ranges: bytes
Content-Length: 223
Content-Type: text/html

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Refresh" content="5; URL=https://worldclim.org/">
</head>

<body>

<h1>Error Loading Page (404)</h1>

The page or file you are looking for is not available.

</body>
</html>""")
gabrieldansereau commented 3 years ago

Is it possible you're using an older version of the package? One from the 0.2.x series perhaps?

It looks like worldclim() is attempting to download the WorldClim 2.0 data, but we switched to WorldClim 2.1 starting from SimpleSDMLayers v0.3.0. If I remember correctly, there were some changes to the WorldClim website at some point, so we had to change the download URLs accordingly. It's likely that downloads will not work anymore when using previous versions of the package.

So I would recommend upgrading to the latest release, v0.3.2, if that's not the case. A few of the features mentioned in our JOSS article were also only implemented starting with v0.3.0.

marcjwilliams1 commented 3 years ago

Yep, that was it. I was still in julia v1.2 which was incompatible with the latest version. Thanks!