Hey everyone,
I have a python script that I wrote which creates a feature class and overwrites a feature class in my geodatabase then overwrites a feature on my enterprise portal. (11.1) Arc Pro Version 3.2.
The issue I have is that this piece of code executes perfectly in the python window, and in a notebook. It will run in the toolbox with no errors but not update the single symbol symbology. I found a bug from 2021 but I am unsure if it was solved.
#Apply Symbology to new layer
symbol = MP.listLayers("Symbology")[0]
Publish = MP.listLayers("Active_DN_Inspections")[0] #creates variable for layer
arcpy.management.ApplySymbologyFromLayer(
in_layer = Publish,
in_symbology_layer = symbol,
symbology_fields = None,
update_symbology = "DEFAULT"
)https://support.esri.com/en-us/bug/applysymbologyfromlayer-in-a-python-script-in-arcgis-pr-bug-000116527
https://community.esri.com/t5/arcgis-pro-questions/applysymbologyfromlayer-management-inside-toolbox/m-p/1090734#M44679