Dear all,
I am writing you to share with you this error that emerged with my CDSAPI python code to retrieve ERA5 data.
I am working on Windows and I managed to correctly install and use the CDSAPI to download some data.
However, I am not really sure what changed now, but I am not able to download anymore. On a test code like the following:
the following error comes up:
runfile('Z:/hard_drive/python/myScripts/ERA5/trial_to_erase_windows.py', wdir='Z:/hard_drive/python/myScripts/ERA5')
2019-08-23 10:24:32,471 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
Traceback (most recent call last):
File "<ipython-input-1-4b5119c3f1d2>", line 1, in <module>
runfile('Z:/hard_drive/python/myScripts/ERA5/trial_to_erase_windows.py', wdir='Z:/hard_drive/python/myScripts/ERA5')
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 95, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "Z:/hard_drive/python/myScripts/ERA5/trial_to_erase_windows.py", line 35, in <module>
'download.nc')
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\cdsapi\api.py", line 280, in retrieve
result = self._api('%s/resources/%s' % (self.url, name), request)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\cdsapi\api.py", line 298, in _api
timeout=self.timeout)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\cdsapi\api.py", line 413, in wrapped
r = call(*args, **kwargs)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\requests\sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\requests\sessions.py", line 519, in request
prep = self.prepare_request(req)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\requests\sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\requests\models.py", line 317, in prepare
self.prepare_auth(auth, url)
File "C:\Users\ameucci\AppData\Local\Continuum\anaconda2\lib\site-packages\requests\models.py", line 548, in prepare_auth
r = auth(self)
TypeError: 'tuple' object is not callable
Do you have any idea of what happened?
Also, few info more:
I have configured my .cdsapirc file as indicated on the website.
I installed the cdsapi with conda environment
Thank you in advance for your help,
Alberto