I have a script that recreates the map server cache tiles that uses a shape file for the area of interest. I am getting this error, even though both shape file and map service are in the same spatial reference:
ERROR 001431: Invalid geometry found after projecting to service's spatial reference
Here's the script:
arcpy.SignInToPortal(portal_url, "user name", "password")
mapserviceURL = r"url to map service/MapServer"
scales = [120000, 60000, 30000, 15000, 7500, 3750, 1875, 938, 469, 235]
numOfCachingServiceInstances = 3
updateMode = "RECREATE_ALL_TILES"
areaOfInterest = "path to my shapefile.shp"
waitForJobCompletion = "WAIT"
updateExtents = ""
result = arcpy.ManageMapServerCacheTiles_server(mapserviceURL, scales, updateMode, numOfCachingServiceInstances, areaOfInterest, updateExtents, waitForJobCompletion)
The script runs and cache tiles are recreated if I use coordinates for the updateExtents. Any ideas why this will not work with a shapefile area of interest?