We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 694c686 commit 95fa740Copy full SHA for 95fa740
stackstac/rio_reader.py
@@ -335,9 +335,10 @@ def _open(self) -> ThreadsafeRioDataset:
335
336
raise RuntimeError(msg) from e
337
if ds.count != 1:
338
+ nr_of_bands = ds.count
339
ds.close()
340
raise RuntimeError(
- f"Assets must have exactly 1 band, but file {self.url!r} has {ds.count}. "
341
+ f"Assets must have exactly 1 band, but file {self.url!r} has {nr_of_bands}. "
342
"We can't currently handle multi-band rasters (each band has to be "
343
"a separate STAC asset), so you'll need to exclude this asset from your analysis."
344
)
0 commit comments