diff --git a/CHANGELOG.md b/CHANGELOG.md index bc91829f9910827407f6c7529aeef4cf5f94e80b..c69f6bed0ff1147b88e5db72f7335c7143befbd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ release. - Fixed findfeatures use of projected mosaics with correct check for TargetName in the Mapping labels. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) - Fixed a bug in the cnetwinnow test that did not clean/remove it during test runs. - Fixed findfeatures instantiation and use of projection classes to correctly return geometry data from projected images and mosaics. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) +- Fixed `cubeit` attribute error to allow attribute specification on the output cube filename [#5234](https://github.com/DOI-USGS/ISIS3/issues/5234) ## [8.0.0] - 2023-04-19 diff --git a/isis/src/base/objs/Cube/Cube.cpp b/isis/src/base/objs/Cube/Cube.cpp index 4cd3594f75e6488dd9d43d1e6c9dcb7ed54ae96f..b55507cd510fd894c2f0292a5a0c3cf423161198 100644 --- a/isis/src/base/objs/Cube/Cube.cpp +++ b/isis/src/base/objs/Cube/Cube.cpp @@ -629,10 +629,15 @@ namespace Isis { initLabelFromFile(cubeFileName, (access == "rw")); - Isis::CubeAttributeInput att(cubeFileName); - if(att.bands().size() != 0) { - vector bands = att.bands(); - setVirtualBands(bands); + try { + Isis::CubeAttributeInput att(cubeFileName); + if(att.bands().size() != 0) { + vector bands = att.bands(); + setVirtualBands(bands); + } + } catch(IException& e) { + // Either the cube is an output cube that has already been opened or + // there is an exception parsing and adding an attribute } // Figure out the name of the data file