stackstac icon indicating copy to clipboard operation
stackstac copied to clipboard

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

Open letmaik opened this issue 3 years ago • 4 comments

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>

letmaik avatar Sep 20 '22 18:09 letmaik

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

gjoseph92 avatar Sep 20 '22 21:09 gjoseph92

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

letmaik avatar Sep 22 '22 13:09 letmaik

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

rbavery avatar Sep 22 '22 16:09 rbavery

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

scottyhq avatar Sep 23 '22 17:09 scottyhq