Get update on request
What maintenance does this project need?
I used to be able to programatically check the update of a request using this:
reply = dict(request_id=df.iloc[i]['r']) # Get ID
new_client = cdsapi.Client(wait_until_complete=False, delete=False)
result = cdsapi.api.Result(new_client, reply)
result.update()
reply = result.reply
After updating to the new cdsapi, result.update() returns:
HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/tasks/2fbb3fcc-e2d9-47c7-aef0-0c9a6a143402
Am I doing something wrong or is the cdsapi still requires updating?
Organisation
UNIGE
I got the same issue
I have a similar problem. I am getting this error while downloading data from ERA5 via API (with the latest version of cdsapi)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/resources/reanalysis-era5-pressure-levels
I found out that the correct URL is
https://cds.climate.copernicus.eu/dataset/reanalysis-era5-pressure-levels
Among them,
https://cds.climate.copernicus.eu
is ERA5 key $HOME /. Cdsapir file url Therefore, the problem is that the location of data stored in the ERA5 website has changed from
resources/reanalysis-era5-pressure-levels
to
dataset/reanalysis-era5-pressure-levels
But the api in this package has not changed I'm not sure if that's the reason
In your case, if the problem is only on downloading data, I think you can change this function of api.py from:
def retrieve(self, name, request, target=None):
result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
if target is not None:
result.download(target)
return result
to
def retrieve(self, name, request, target=None):
result = self._api("%s/dataset/%s" % (self.url, name), request, "POST")
if target is not None:
result.download(target)
return result
In my case, I am trying to first get an update on the task before downloading.
I'm getting the same issue, the /api/tasks route if cds.climate.copernicus.eu returns a 404 since the migration.
The release notes of 0.7.2 state
Technical/code issues related to the cdsapi applicable to the new system only, may be raised in the [cads-api-client](https://github.com/ecmwf-projects/cads-api-client repository or alternatively using the ECMWF Support Portal. Any other issues raised here or in the cads-api-client will be ignored. Any other issues, requirements and suggestions for improvement to the cdsapi e.g. issues related to datasets should be raised with our Support team via the ECMWF Support Portal or alternatively shared with other users on the forum.
so I'm unsure if we'll get feedback here
@valpesendorfer see https://forum.ecmwf.int/t/programatically-get-request-status-error-with-new-cdsapi/6379