[Color Space Explorer app] error for non-spectral raster

Issue #1277 resolved
Andreas Rabe created an issue

Reported by @Fabian Thiel .

I think this error showed up when I selected a layer (indices) without wavelength information which was currently visualized as singleband gray

AttributeError: 'QgsSingleBandGrayRenderer' object has no attribute 'setRedBand' 
Traceback (most recent call last):
  File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/coreapps/colorspaceexplorerapp/colorspaceexplorerdialog.py", line 217, in onLiveUpdate
    self.onApplyClicked()
  File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/coreapps/colorspaceexplorerapp/colorspaceexplorerdialog.py", line 205, in onApplyClicked
    layer.renderer().setRedBand(self.mRedBand.currentBand())
AttributeError: 'QgsSingleBandGrayRenderer' object has no attribute 'setRedBand'

Comments (2)

  1. Andreas Rabe reporter

    @Fabian Thiel also reported:

    Maybe only show raster layers which are openend in a Map View, otherwise user might be irritated why nothing is happening (although its kind of obvious)

    This is related to a bug that we can’t solve. Currently you need to manually remove all non-EnMAP-Box layers here:

  2. Log in to comment