Skip to content

issue with iris saver with delayed and dask==2025.4.0 #6417

@valeriupredoi

Description

@valeriupredoi

Hi folks, apologies I had to renounce the issue template, this is more of a heads up that may need further investigation (it most probably is a Dask issue, as per usual): see ESMValGroup/ESMValCore#2716 and our failed test as of last night with the brand new dask==2025.4.0

/opt/conda/envs/esmvaltool/lib/python3.13/site-packages/iris/io/__init__.py:476: in save
    result = saver(source, target, **kwargs)
/opt/conda/envs/esmvaltool/lib/python3.13/site-packages/iris/fileformats/netcdf/saver.py:2746: in save
    with Saver(filename, netcdf_format, compute=compute) as sman:
/opt/conda/envs/esmvaltool/lib/python3.13/site-packages/iris/fileformats/netcdf/saver.py:437: in __exit__
    self.complete()

self = <iris.fileformats.netcdf.saver.Saver object at 0x7f7a5b668470>

    def complete(self) -> None:
        """Complete file by computing any delayed variable saves.
    
        This requires that the Saver has closed the dataset (exited its context).
    
        """
        if self._dataset.isopen():
            msg = (
                "Cannot call Saver.complete() until its dataset is closed, "
                "i.e. the saver's context has exited."
            )
            raise ValueError(msg)
    
        # Complete the saves now
>       self.delayed_completion().compute()
E       AttributeError: 'tuple' object has no attribute 'compute'

Cheers 🍺

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions