Skip to content

Incompatibility between odc-stac 0.3.11 and Dask 2025.3.0+ in Pangeo images #628

@TomPug

Description

@TomPug

Problem Description

Current Pangeo images contain incompatible versions of odc-stac and dask, which prevents importing and using odc-stac. The specific error is:

ImportError: cannot import name 'quote' from 'dask.base' 
(/srv/conda/envs/notebook/lib/python3.12/site-packages/dask/base.py)

Environment

  • Pangeo Image: pangeo/pangeo-notebook (recent version)
  • Python: 3.12
  • odc-stac: 0.3.11
  • dask: 2025.3.0 or higher

Steps to Reproduce

import odc.stac
# ImportError: cannot import name 'quote' from 'dask.base'

Root Cause

Dask version 2025.3.0 removed the quote function from the dask.base module, but odc-stac 0.3.11 still attempts to import it in odc/loader/_builder.py:

from dask.base import quote, tokenize  # This line fails

This is a known issue reported in:

Proposed Solutions

Option 1: Update odc-stac (Recommended)

Update to odc-stac 0.4.0rc4 or higher, which is compatible with recent dask versions:

# In environment.yml or conda-lock.yml
dependencies:
  - odc-stac>=0.4.0rc4

Option 2: Downgrade dask (Temporary)

If it's necessary to keep odc-stac 0.3.11 temporarily:

dependencies:
  - dask<=2025.2.0

Impact

This issue affects any Pangeo image users who need to use odc-stac for:

  • Loading STAC data into xarray
  • Working with STAC catalogs (Sentinel-2, Landsat, etc.)
  • STAC-based geospatial processing

Additional Constraints

In my particular case, I cannot downgrade dask due to dependencies from other packages in the environment, so the only viable solution is to update odc-stac.

Request

Could you please update odc-stac to version 0.4.0rc4 or higher in Pangeo images to resolve this incompatibility?

Alternatively, if there's a specific reason to keep odc-stac at 0.3.11, we would appreciate guidance on alternatives for loading STAC data in these environments.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions