ecmwf / cdsapi

Python API to access the Copernicus Climate Data Store (CDS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeyError: 'kwargs' when submitting a workflow with workflow method

francesconazzaro opened this issue · comments

If I try to submit a workflow with the following code I get an error:

import cdsapi
cds = cdsapi.Client()
result = cds.workflow(code)

I get the following error:

 Request is failed
 Message: an internal error occurred processing your request
 Reason:  'kwargs'
   Traceback (most recent call last):
     File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 49, in handle_request
       result = cached(context.method, proc, context, context.args, context.kwargs)
     File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
       result = proc(context, *context.args, **context.kwargs)
     File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 118, in __call__
       return p(*args, **kwargs)
     File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 59, in __call__
       return self.proc(context, *args, **kwargs)
     File "/home/cds/cdsservices/services/run_workflow.py", line 12, in execute
       params['kwargs'].pop('_timestamp', None)
   KeyError: 'kwargs'

The error doesn't depend on the code.
I have been getting this error since the mimic_ui function was added. It seems that the service method API has changed.

I can confirm that this bug is present in version 0.4.0 but not in 0.3.1.