cdsapi icon indicating copy to clipboard operation
cdsapi copied to clipboard

Key error with wait_until_complete

Open vvandermeersch opened this issue 2 years ago • 1 comments

Hello,

When I use wait_until_complete=False, I get the following error:

2022-02-02 12:29:22,550 INFO Welcome to the CDS
2022-02-02 12:29:22,551 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-land
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    c.retrieve(
  File "users\Python310\lib\site-packages\cdsapi\api.py", line 350, in retrieve
    result.download(target)
  File "users\Python310\lib\site-packages\cdsapi\api.py", line 173, in download
    return self._download(self.location, self.content_length, target)
  File "users\Python310\lib\site-packages\cdsapi\api.py", line 181, in location
    return urljoin(self._url, self.reply["location"])
KeyError: 'location'

Does someone know how to solve this issue ?

vvandermeersch avatar Feb 02 '22 11:02 vvandermeersch

Hi @vvandermeersch ,

Are you still experiencing this issue? Can you post your full python script so that I can see the full issue

Many thanks, Eddy

EddyCMWF avatar Feb 28 '23 10:02 EddyCMWF