Trying to automate map creating process. When applying symbology from model map to new map using the code below, everything except labeling applies. The new layer is a part of layer in model map (it´s a clip of layer in model map), I want to use the same field and labeling settings, just need it to apply to layer in new map with same settings as in model map. Data type of the field is equal in both layers too. The problem is somewhere in rows 5-7, layer names, project, listed maps etc. are fine.
Can´t find an article about symbology and mainly labeling properties/methods.
Using Python 3.7.11 and ArcGIS Pro 2.9
aprx=a.mp.ArcGISProject('F:\path\to\project\project.aprx")
m1=aprx.listMaps('Model')[0]
m2=aprx.listMaps('New')[0]
sym=m2.listLayers('layer1')[0].symbology
apply_to=m1.listLayers('layer2')[0]
apply_to.symbology=sym
aprx.save()
del aprx