I get this error when I run my script:

Traceback (most recent call last):
File "", line 1, in AttributeError: 'Symbology' object has no attribute 'renderer'


p = arcpy.mp.ArcGISProject("CURRENT")
m = p.listMaps('Map')[0]
l = m.listLayers('Raster1')[0]
sym = l.symbology


According to this URL's page there shouldn't be any error.

  • 2
    @BERA that looks like it could easily be made into an answer that I would upvote.
    – PolyGeo
    Commented Sep 15, 2019 at 20:10

1 Answer 1


Accourding to the help section for symbology class:

It is important to first make sure that a layer supports a renderer or colorizer and to know its type before trying to make updates to it. The built in hasattr function can be used for this purpose.

hasattr(l, 'renderer')

So renderer might not be supported for your raster layer.

What are you trying to do with the raster symbology? Maybe some other method is supported which you can use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.