# ADS download script not working, though it worked last month

**URL:** <https://forum.ecmwf.int/t/ads-download-script-not-working-though-it-worked-last-month/6974>\
**Category:** Access and Login\
**Created:** [16 October 2024 14:56 UTC](https://forum.ecmwf.int/t/ads-download-script-not-working-though-it-worked-last-month/6974 "2024-10-16T14:56:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Caseiro](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@Alexandre\_Caseiro](https://forum.ecmwf.int/u/Alexandre_Caseiro)\
**Post date:** [16 October 2024 14:56 UTC](https://forum.ecmwf.int/t/ads-download-script-not-working-though-it-worked-last-month/6974/1 "2024-10-16T14:56:22Z")

</div>

Hi, I am trying to run the following example (derived from a much more complex script), but it does not work. The script itself worked last month.

> import cdsapi  
> import os  
> c = cdsapi.Client()  
> c.retrieve(  
> ‘cams-global-reanalysis-eac4’,  
> {  
> ‘format’: ‘netcdf’,  
> ‘variable’: [‘t2m’],  
> ‘model\_level’: ‘60’,  
> ‘date’: ‘2020-01-01/2020-12-31’,  
> ‘time’: [‘00:00’, ‘03:00’, ‘06:00’, ‘09:00’, ‘12:00’, ‘15:00’,‘18:00’, ‘21:00’,],  
> ‘area’: [56, 6, 38, 34,],  
> },  
> ‘./test.nc’).download()

My .cdsapirc file looks like this:

> url: [https://ads.atmosphere.copernicus.eu/api](https://ads.atmosphere.copernicus.eu/api)  
> key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

However, I got the following error (it looks like it has to do with access):

> 2024-10-16 16:52:58,889 INFO Sending request to [https://ads.atmosphere.copernicus.eu/api/resources/cams-global-reanalysis-eac4](https://ads.atmosphere.copernicus.eu/api/resources/cams-global-reanalysis-eac4)  
> Traceback (most recent call last):  
> File “simple\_test\_01.py”, line 5, in   
> c.retrieve(  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/cdsapi/api.py”, line 280, in retrieve  
> result = self.\_api(‘%s/resources/%s’ % (self.url, name), request)  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/cdsapi/api.py”, line 295, in \_api  
> result = self.robust(session.post)(url,  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/cdsapi/api.py”, line 413, in wrapped  
> r = call(\*args, \*\*kwargs)  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/requests/sessions.py”, line 578, in post  
> return self.request(‘POST’, url, data=data, json=json, \*\*kwargs)  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/requests/sessions.py”, line 516, in request  
> prep = self.prepare\_request(req)  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/requests/sessions.py”, line 449, in prepare\_request  
> p.prepare(  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/requests/models.py”, line 318, in prepare  
> self.prepare\_auth(auth, url)  
> File “/work/users/aca/anaconda3/envs/ClimPol05\_CAMS/lib/python3.8/site-packages/requests/models.py”, line 549, in prepare\_auth  
> r = auth(self)  
> TypeError: ‘tuple’ object is not callable

Any help welcome  
Cheers and thanks

---

<div class="post-metadata">

**Author:** ![Kevin\_Marsh](https://forum.ecmwf.int/user_avatar/forum.ecmwf.int/kevin_marsh/32/368_2.png) [@Kevin\_Marsh](https://forum.ecmwf.int/u/Kevin_Marsh)\
**Post date:** [16 October 2024 20:05 UTC](https://forum.ecmwf.int/t/ads-download-script-not-working-though-it-worked-last-month/6974/2 "2024-10-16T20:05:29Z")

</div>

hi  
are you using the latest version of the CDS API (0.7.3)?

---

<div class="post-metadata">

**Author:** ![Alexandre\_Caseiro](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@Alexandre\_Caseiro](https://forum.ecmwf.int/u/Alexandre_Caseiro)\
**Post date:** [16 October 2024 21:32 UTC](https://forum.ecmwf.int/t/ads-download-script-not-working-though-it-worked-last-month/6974/3 "2024-10-16T21:32:56Z")

</div>

That’s exactly it, I should have thought of updating. Thanks for the assistance.
