Closed MaxDragonheart closed 1 year ago
In this line:
asset_eo_ext.apply(bands=band_info)
bands
should be a list[Band]
-- in your case, it's just a Band
. If your asset only has one band, all you need to do is wrap your band_info
in a list, e.g.:
asset_eo_ext.apply(bands=[band_info])
Closing as answered. @MaxDragonheart please re-open if that resolution is incorrect.
Sorry for the late response. Thank for your support, this asset_eo_ext.apply(bands=[band_info])
solved the trouble :smile:
Hi guys! Probably this is not a bug but my misunderstanding about how is possible to create the assets.
Whit the function below, I create a dictionary with all bands of Sentinel 2 platform:
SENTINEL2_BANDS
is a simple dictionary with values useful for me:Later, I try to create the asset from each band. E.g. using
B04
:{'href': './S2B_MSIL2A_20230601T094549_R079_T33TVF_20230601T163334/T33TVF_20230601T094549_B04_10m.tif', 'title': 'B04', 'description': 'Band description.'}
<Band name=B04>
<AssetEOExtension Asset href=./S2B_MSIL2A_20230601T094549_R079_T33TVF_20230601T163334/T33TVF_20230601T094549_B04_10m.tif>
Problems come when I try to apply
band_info
toasset_eo_ext
:Here the error message:
What I'm doing wrong?
I'm using Python 3.10 with pystac 1.7.3