Skip to content

Read STAC Tutorial Broken w/ Current Library Versions #1572

@asmithml

Description

@asmithml

PySTAC is fairly new to me, so below are my best guesses at the causes and solutions.

Summary

The tutorial docs/tutorials/how-to-read-data-from-stac.ipynb doesn't work with current library versions. Three issues prevent the examples from running.

Issues

1. COGs section - Missing EPSG

The Planetary Computer's Landsat STAC items lack proj:epsg metadata, causing stackstac to fail.

# Original - FAILS
xr.open_dataset(landsat_item)
# ValueError: Cannot pick a common CRS...

# Fix needed
xr.open_dataset(landsat_item, epsg=32656)

2. Zarr section - Missing authentication

Azure Blob Storage now requires authentication for Daymet data.

# Original - FAILS  
xr.open_dataset(daymet_asset)
# ClientAuthenticationError: Server failed to authenticate

# Fix needed
signed_asset = pc.sign(daymet_asset)
xr.open_dataset(signed_asset)

3. Kerchunk section - Broken compatibility

CMIP6 data needs authentication, but even after signing, zarr 3.x and fsspec 2025.x have async compatibility issues that prevent opening reference files.

# After authentication, still fails with:
# ValueError: Reference-FS's target filesystem must have same value of asynchronous

Environment

  • xarray: 2025.8.0, pystac: 1.13.0, xpystac: 0.2.0
  • stackstac: 0.5.1, zarr: 3.1.1, fsspec: 2025.7.0

Question

Should the tutorial be updated with these fixes, or would that break compatibility with older versions? The Kerchunk issue appears unresolvable without library downgrades.

Metadata

Metadata

Assignees

Labels

documentationIssues related to PySTAC documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions