Skip to content

rasterlayerstylingpanel AttributeError: 'QgsSingleBandGrayRenderer' object has no attribute 'redContrastEnhancement' #1492

@jakimowb

Description

@jakimowb

This error occurred when trying to visualize an in-memory NDVI 1-band raster.

An error has occurred while executing Python code: 

AttributeError: 'QgsSingleBandGrayRenderer' object has no attribute 'redContrastEnhancement'. Did you mean: 'setContrastEnhancement'? 
Traceback (most recent call last):
  File "/home/jakimowb/.local/share/QGIS/QGIS3/profiles/EnMAP-Box/python/plugins/enmapboxplugin/enmapbox/coreapps/rasterlayerstylingapp/rasterlayerstylingpanel.py", line 636, in updateMinMax
    self.updateRenderer()
  File "/home/jakimowb/.local/share/QGIS/QGIS3/profiles/EnMAP-Box/python/plugins/enmapboxplugin/enmapbox/coreapps/rasterlayerstylingapp/rasterlayerstylingpanel.py", line 646, in updateRenderer
    (self.mRedBand, renderer.redContrastEnhancement(), renderer.setRedBand),
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'QgsSingleBandGrayRenderer' object has no attribute 'redContrastEnhancement'. Did you mean: 'setContrastEnhancement'?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions