euronion / trace

16 stars 3 forks source link

WDPA error in download_datasets() #18

Open MurkyTheMurloc opened 2 years ago

MurkyTheMurloc commented 2 years ago

Error in download_datasets(): Where can this (known) error regarding the WDPA download be fixed?

HTTP.ExceptionRequest.StatusError(404, "GET", "/current/WDPA_WDOECM_**May2021**_Public_feadb1b4f30799a6dc3ad0b161188%|████████████████████████████████████████████████████████████▌        | 988M/1.10G [05:27<00:31, 4.61MB/s]HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Content-Type: application/xml
Transfer-Encoding: chunked
Connection: keep-alive
Date: Sun, 10 Jul 2022 13:24:49 GMT
Server: AmazonS3
X-Cache: Error from cloudfront
Via: 1.1 d9a3650110a8e2b78edd73b33e0fa948.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: TXL50-P4
X-Amz-Cf-Id: -3IUMVl6o4Thh4yw6ALThOd9QFvTsylo9eGevAm7ca8Npt9wI2o_YA==
euronion commented 2 years ago

Three options:

  1. Change the URL inside your local Julia source code for GlobalEnergyGIS to point to the correct URL:
    • Get the correct (current, monthly changing!) URL from protectedplanet.net -> Resources -> WDPA -> Download -> Non-Commercial Use -> Right Click on "Download" and extract the target link. The current one is: https://d1gam3xoknrgr2.cloudfront.net/current/WDPA_Jul2022_Public_shp.zip
    • Locate your local Julia package store, usually in your home directory (Linux: ~/.julia/packages/GlobalEnergyGIS/<the version you are using> or on Windows in C:\Users\<your username>\.julia\packages\GlobalEnergyGIS\<the version you are using>)
    • Open downloaddatasets.jl
    • Change in get_datasetinfo() the URL for WDPA to the current one.
  2. Get the files from somewhere else and put them manually into the folder. (probably the easiest, but also the least reproducible)
  3. Hope GlobalEnergyGIS fixed it upstream and the new version is compatible with this workflow (https://github.com/niclasmattsson/GlobalEnergyGIS). It probably is not, but if you want to try: Remove the version restrictions in envs/JuliaProject.toml and updated GlobalEnergyGIS.

This is one of the reasons I'm trying to get away from GlobalEnergyGIS at the moment, but in the main branch the dependency is still in there for good.