I am trying to update the symbology of a layer using arcpy, but I get an error saying:
'Layer' object has no attribute 'symbology'
My (stripped) code is:
mySettings = GetSettings() #returns a pandas dataframe object
myProject = arcpy.mp.ArcGISProject(mySettings.loc["ArcGIS project"]["Value"])
myMap = myProject.listMaps("Layers")[0]
myTemplate = arcpy.mp.LayerFile(mySettings.loc["Template file"]["Value"]).listLayers()[0]
myMap.addLayer(myTemplate)
mySymbology = myTemplate.symbology
Can anyone tell me what is wrong with this code?