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
Problem Description
Current Pangeo images contain incompatible versions of
odc-stacanddask, which prevents importing and usingodc-stac. The specific error is:Environment
pangeo/pangeo-notebook(recent version)Steps to Reproduce
Root Cause
Dask version 2025.3.0 removed the
quotefunction from thedask.basemodule, butodc-stac0.3.11 still attempts to import it inodc/loader/_builder.py:This is a known issue reported in:
odc.stacon Colab opendatacube/odc-stac#164Proposed Solutions
Option 1: Update odc-stac (Recommended)
Update to
odc-stac0.4.0rc4 or higher, which is compatible with recent dask versions:Option 2: Downgrade dask (Temporary)
If it's necessary to keep
odc-stac0.3.11 temporarily:Impact
This issue affects any Pangeo image users who need to use
odc-stacfor: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-stacto version 0.4.0rc4 or higher in Pangeo images to resolve this incompatibility?Alternatively, if there's a specific reason to keep
odc-stacat 0.3.11, we would appreciate guidance on alternatives for loading STAC data in these environments.References
odc.stacon Colab opendatacube/odc-stac#164