Deltares / dfm_tools

A Python package for pre- and postprocessing D-Flow FM model input and output files
https://deltares.github.io/dfm_tools/
GNU General Public License v3.0
70 stars 13 forks source link

fix cds errors with new cdsapi version #1003

Closed veenstrajelmer closed 2 months ago

veenstrajelmer commented 2 months ago

cdsapi 0.7.3 makes some tests fail:

FAILED tests/test_download.py::test_cds_credentials_newurl_incorrectkey_rcfile - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/test_download.py::test_cds_credentials_newurl_incorrectkey_envvars - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/test_download.py::test_cds_credentials_oldurl_incorrectkey_rcfile - Failed: DID NOT RAISE <class 'ValueError'>

ERROR tests/test_download.py::test_download_era5 - requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://cds-beta.climate.copernicus.eu/api/retrieve/v1/processes/reanalysis-era5-single-levels/execution
Authentication failed
operation not allowed
ERROR tests/test_modelbuilder.py::test_preprocess_merge_meteofiles_era5_unsupported_varlist - requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://cds-beta.climate.copernicus.eu/api/retrieve/v1/processes/reanalysis-era5-single-levels/execution
Authentication failed
operation not allowed
ERROR tests/test_xarray_helpers.py::test_merge_meteofiles - requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://cds-beta.climate.copernicus.eu/api/retrieve/v1/processes/reanalysis-era5-single-levels/execution
Authentication failed
operation not allowed