Error when animating Pcolormesh plots

Hello, I receive the following error, when I try to animate 12 Pcolormesh plots using ct.animate.figure:

Traceback (most recent call last):
File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/", line 49, in handle_request
result = cached(context.method, proc, context, context.args, context.kwargs)
File "/opt/cdstoolbox/cdscompute/cdscompute/", line 108, in cached
result = proc(context, *context.args, **context.kwargs)
File "/opt/cdstoolbox/cdscompute/cdscompute/", line 118, in __call__
return p(*args, **kwargs)
File "/opt/cdstoolbox/cdscompute/cdscompute/", line 59, in __call__
return self.proc(context, *args, **kwargs)
File "/home/cds/cdsservices/services/", line 46, in figure
cmd = prepare_cmd(context, figures=figures, framerate=framerate)
File "/home/cds/cdsservices/services/", line 27, in prepare_cmd
context.run_command('/bin/bash', '-c', '%s' % " ".join(cmd + palette_opt))
TypeError: sequence item 1: expected str instance, dict found

I use the following code:

figs = []
for mm in range(1,13):
month = '%02d'%(mm)
data = ct.catalogue.retrieve(
'satellite-humidity-profiles', {
'variable': 'all',
'product_type': Product_type.lower().replace(' ','_'),
'product_version': '0010',
if mm==1:
year_data = data
year_data = ct.cube.concat([year_data,data], dim='time')

fig = ct.cdsplot.figure(suptitle='Zonal Humidity - '+Year+month)
fig = ct.cdsplot.pcolormesh(
data, cmap='coolwarm', x='lat', y='height',
ylim=[0,1.2e4], fig=fig)

anim = ct.animate.figure(figs)

The rest of the code can be found here:

I hope someone can help.

Thank You.

Dear Huayuan,

ct.animate.figure only support figures output with at the moment so you cannot animate a list of figures created with ct.cdsplot as it is unfortunately.



Thank you for your quick reply Vivien (smile)