gjoseph92 / stackstac

Turn a STAC catalog into a dask-based xarray
https://stackstac.readthedocs.io
MIT License
238 stars 49 forks source link

Unrecognized STAC collection type <class 'pystac.item_collection.ItemCollection'> #179

Open letmaik opened 1 year ago

letmaik commented 1 year ago

I was following the basic example from the docs https://stackstac.readthedocs.io/en/latest/basic.html but it falls over at stackstac.stack(items):

TypeError: Unrecognized STAC collection type <class 'pystac.item_collection.ItemCollection'>: <pystac.item_collection.ItemCollection object at 0x000001C57CB0BCD0>

gjoseph92 commented 1 year ago

Can you share the versions of stackstac and pystac you have installed?

letmaik commented 1 year ago

stackstac==0.4.3 pystac==1.6.1 pystac-client==0.5.0

rbavery commented 1 year ago

With the following versions, the example works for me

stackstac==0.4.3 pystac==1.4.0 pystac-client==0.5.1

so it seems like it could be related to how the newest version of pystac returns an item collection with a different type

scottyhq commented 1 year ago

Works fine for me with latest versions. This is a duplicate of #124. @letmaik it's likely older versions of pystac/stackstac that somehow are getting picked up in your environment. A full traceback or output of conda list would be helpful to know for sure...

%load_ext watermark
%watermark --iversions
pystac       : 1.6.1
pystac_client: 0.5.0
stackstac    : 0.4.3