Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 when trying to retrieve data #135

Open
mRcSchwering opened this issue Jan 3, 2025 · 0 comments
Open

404 when trying to retrieve data #135

mRcSchwering opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mRcSchwering
Copy link

What happened?

I was trying to download a dataset (reanalysis-oras5) but got 404 when calling client.retrieve.
When I try to open https://cds.climate.copernicus.eu/api in a browser I also see 404.

What are the steps to reproduce the bug?

Run:

client = cdsapi.Client()
client.retrieve(
    "reanalysis-oras5",
    {
        "product_type": "operational",
        "format": "tgz",
        "year": "2024",
        "vertical_resolution": "all_levels",
        "month": [f"{d:02d}" for d in range(1, 13)],
        "variable": "rotated_zonal_velocity"
    },
    "myfile.grib",
)

Version

v0.7.5

Platform (OS and architecture)

ubuntu 22.04

Relevant log output

2025-01-03 09:05:25,014 INFO Sending request to https://cds.climate.copernicus.eu/api/resources/reanalysis-oras5
Traceback (most recent call last):
  File "/home/marc/anaconda3/envs/prevwinds_prep/lib/python3.10/site-packages/cdsapi/api.py", line 459, in _api
    result.raise_for_status()
  File "/home/marc/anaconda3/envs/prevwinds_prep/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/resources/reanalysis-oras5

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marc/anaconda3/envs/prevwinds_prep/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/marc/anaconda3/envs/prevwinds_prep/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/marc/prevailing-winds/prep/main.py", line 158, in <module>
    main(vars(args))
  File "/home/marc/prevailing-winds/prep/main.py", line 92, in main
    cmdmap[cmd](cnfg)
  File "/home/marc/prevailing-winds/prep/main.py", line 20, in _download_cmd
    oras5.download(cnfg=cnfg)
  File "/home/marc/prevailing-winds/prep/src/oras5.py", line 123, in download
    _download_dataset(
  File "/home/marc/prevailing-winds/prep/src/oras5.py", line 27, in _download_dataset
    client.retrieve(
  File "/home/marc/anaconda3/envs/prevwinds_prep/lib/python3.10/site-packages/cdsapi/api.py", line 381, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/marc/anaconda3/envs/prevwinds_prep/lib/python3.10/site-packages/cdsapi/api.py", line 481, in _api
    raise Exception(error)
Exception: Not Found


### Accompanying data

_No response_

### Organisation

_No response_
@mRcSchwering mRcSchwering added the bug Something isn't working label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant