You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is a ValueError being raised because the ds.count statement in the error message is executed on a closed file. So
File ~/apps/miniforge3/envs/devseed/lib/python3.11/site-packages/stackstac/rio_reader.py:340, in AutoParallelRioReader._open(self)
337 if ds.count != 1:
338 ds.close()
339 raise RuntimeError(
--> 340 f"Assets must have exactly 1 band, but file {self.url!r} has {ds.count}. "
341 "We can't currently handle multi-band rasters (each band has to be "
342 "a separate STAC asset), so you'll need to exclude this asset from your analysis."
343 )
With the following error
ValueError: Can't read closed raster file
Proposed solution: compute count before clsoing file.
The text was updated successfully, but these errors were encountered:
yellowcap
changed the title
Error for assests with multiple bands is not raised correctly/
Error for assests with multiple bands is not raised correctly
Dec 6, 2023
yellowcap
added a commit
to yellowcap/stackstac
that referenced
this issue
Dec 6, 2023
Currently there is a
ValueError
being raised because theds.count
statement in the error message is executed on a closed file. SoWith the following error
Proposed solution: compute count before clsoing file.
The text was updated successfully, but these errors were encountered: