microsoft / PlanetaryComputerExamples

Examples of using the Planetary Computer
MIT License
360 stars 176 forks source link

module 'pystac_client' has no attribute 'ItemCollection' #288

Open Rudigithub12345 opened 6 months ago

Rudigithub12345 commented 6 months ago

Hi

I run this example https://planetarycomputer.microsoft.com/docs/tutorials/cloudless-mosaic-sentinel2/ and i found following error:


AttributeError Traceback (most recent call last) Cell In[23], line 1 ----> 1 signed_items = pystac_client.ItemCollection([ 2 planetary_computer.sign_assets(item) for item in items 3 ]) 4 #print(signed_items) 5 data = ( 6 stackstac.stack( 7 items, (...) 13 .assign_coords(band=lambda x: x.common_name.rename("band")) # use common names 14 )

AttributeError: module 'pystac_client' has no attribute 'ItemCollection'

How to solve this problem?

TomAugspurger commented 6 months ago

I don't see signed_items = pystac_client.ItemCollection(...) in the link you provided. Can you double check that your link is correct? You should also check that you have the latest version of the PlanetaryComputerExamples repository. pystac_client used to have an ItemCollection, before it was moved to pystac.