download function error:'module' object is not callable
Alven8816 opened this issue · comments
Hi, it is appreciated to get your help.
My environment: Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
the code as follows:
import cdsapi
c = cdsapi.Client()
r = c.retrieve(
"reanalysis-era5-pressure-levels",
{
"variable": "temperature",
"pressure_level": "1000",
"product_type": "reanalysis",
"year": "2008",
"month": "01",
"day": "01",
"time": "12:00",
"format": "grib"
},
)
r.download("download.grib")
It is successful to retrieve the requests and was shown in https://cds.climate.copernicus.eu/cdsapp#!/yourrequests
However, when I try to download the result by using:
r.download("download.grib")
It shows the Errors:
r.download("download.grib")
2020-11-26 15:00:14,179 INFO Downloading http://136.156.132.201/cache-compute-0004/cache/data3/adaptor.mars.internal-1606349148.740683-9340-19-64a26b8e-f9c7-4a4d-995f-e58359f0fb19.grib to download.grib (2M)
2020-11-26 15:00:14,184 DEBUG Starting new HTTP connection (1): 136.156.132.201
2020-11-26 15:00:14,816 DEBUG http://136.156.132.201:80 "GET /cache-compute-0004/cache/data3/adaptor.mars.internal-1606349148.740683-9340-19-64a26b8e-f9c7-4a4d-995f-e58359f0fb19.grib HTTP/1.1" 200 2076600
Traceback (most recent call last):
File "", line 1, in
r.download("download.grib")
File "D:\Anaconda3\lib\site-packages\cdsapi\api.py", line 167, in download
target)
File "D:\Anaconda3\lib\site-packages\cdsapi\api.py", line 125, in _download
leave=False,
TypeError: 'module' object is not callable
What is the problem and how to fix it out? Thanks
Hi @Alven8816 ,
Apologies for the slow response.
Can you confirm if this is still an issue please, I cannot reproduce the issue and maybe it has been resolved since you originally posted here. I will close for now but will re-open if needed.
Also, for future reference you will get a faster response to general issues via one of the C3S user support channels:
https://cds.climate.copernicus.eu/cdsapp#!/usersupport
Thanks,
Eddy