cdsapi icon indicating copy to clipboard operation
cdsapi copied to clipboard

standalone download method does not correctly handle filenames

Open EddyCMWF opened this issue 8 months ago • 0 comments

What happened?

As reported here: https://jira.ecmwf.int/browse/CUS-13245 The filename is treated as a list when provided to the client.download method

What are the steps to reproduce the bug?

result = c.service(
    "tool.toolbox.orchestrator.workflow",
     params={ 
        "realm": "user-apps",
        "project": "app-c3s-daily-era5-statistics",
        "version": "master",
        "kwargs": {
                "dataset": "reanalysis-era5-single-levels",
                "product_type": "reanalysis",
                "variable": "2m_temperature",
                "statistic": "daily_mean",
                "year": "2020",
                "month": "01",
                "time_zone": "UTC+00:00",
                "frequency": "1-hourly",
                "grid": "0.25/0.25",
                "area":  {"lat": [-90, 90], "lon": [-180, 180]}
          },
          "workflow_name": "application"
})
c.download(result,["test.nc"])

Could also be a normal retrieve request

Version

latest

Platform (OS and architecture)

linux, macos

Relevant log output

No response

Accompanying data

No response

Organisation

No response

EddyCMWF avatar Oct 26 '23 10:10 EddyCMWF