8000 Get update on request · Issue #122 · ecmwf/cdsapi · GitHub
[go: up one dir, main page]

Skip to content

Get update on request #122

Open
Open

Description

@e5k

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

Activity

  1. GhislainViguierEdf commented on Sep 27, 2024

    @GhislainViguierEdf

    I got the same issue

  2. YYC54 commented on Sep 28, 2024

    @YYC54

    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

  3. e5k commented on Sep 30, 2024

    @e5k
    Author

    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.

  4. valpesendorfer commented on Sep 30, 2024

    @valpesendorfer

    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

  5. e5k commented on Oct 1, 2024

    @e5k
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0