Is this possible to run on a hosted features layer? I'm running into errors when executing my script. I have an ArcPro project saved with my imported layer from AGOL.
import arcpy
from arcgis import GIS
prjPath = r"C:\Python\XY_test\MyProject5\MyProject5.aprx"
proj = arcpy.mp.ArcGISProject(prjPath)
map = proj.listMaps()[0]
layer = map.listLayers()[0]
arcpy.CalculateGeometryAttributes_management(layer, ["Northing", "POINT_Y"])
print ('Northing Update Complete')