ERROR 001272: Analyzer errors were encountered (code:00363)

1561
5
Jump to solution
02-07-2022 05:35 AM
MarieSchubert
New Contributor II

Hi there,

I want to overwrite Feature Layers from ArcGIS Pro to ArcGIS Online. When it comes to arcpy.server.StageService I get the following error: ERROR 001272: Analyzer errors were encountered (code:00363). It tells me to change the names SHAPE__AREA or SHAPE__LENGTH in my attribute table because their reserved for use by map and feature services, but I have a feature service.

Here is the link to the documentary:

https://pro.arcgis.com/en/pro-app/latest/help/sharing/analyzer-error-messages/00362-datasets-expose-...

 

Here is my code.

 

        # Create FeatureSharingDraft and set overwrite property
server_type = "HOSTING_SERVER"

        #iterate through the layers and upload

i = 0
for layername in pro:
    print(matching[layername])
    sddraft = geoMap.getWebLayerSharingDraft(server_type, "FEATURE", matching[layername])
    sddraft.overwriteExistingService = True
    sddraft.exportToSDDraft(finalsddraft[i])
    arcpy.server.StageService(finalsddraft[i], finalsd[i])
    arcpy.server.UploadServiceDefinition(finalsd[i], server_type)
    i += 1


Traceback (most recent call last):
  File "<string>", line 54, in <module>
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1088, in StageService
    raise e
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1085, in StageService
    retval = convertArcObjectToPythonObject(gp.StageService_server(*gp_fixargs((in_service_definition_draft, out_service_definition, staging_version), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 001272: Analyzer errors were encountered ([{"code":"00362","message":"The dataset 'L0polygons' exposes the reserved field name: 'Shape__Area'.  Rename or remove this field.","object":"polygons"},{"code":"00362","message":"The dataset 'L0polygons' exposes the reserved field name: 'Shape__Length'.  Rename or remove this field.","object":"polygons"},{"code":"00362","message":"The dataset 'L0polygons' exposes the reserved field name: 'Shape__Area'.  Rename or remove this field.","object":"polygons"},{"code":"00362","message":"The dataset 'L0polygons' exposes the reserved field name: 'Shape__Length'.  Rename or remove this field.","object":"polygons"}]).
Failed to execute (StageService).

 

 

I have been unable to find details about ERROR 001272. Any suggestions for a soltion?

0 Kudos
1 Solution

Accepted Solutions
MarieSchubert
New Contributor II

Hi Jonah,

thanks for the hint! I had a grouped layer called polygons in my content. I removed it and now it works!

I don't quite understand why, I never referenced the layer. That's why I didn't considered this layer to be the problem.

Thank you very much for your help!

 

View solution in original post

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

001272: Analyzer errors were encountered (<value>).—ArcGIS Pro | Documentation

if you can make sense of the proposed solution


... sort of retired...
0 Kudos
JonahLay
Esri Contributor

Hi,

As the topic provided by @DanPatterson mentioned, you'll need to open up the ArcGIS Pro map that causes the error. You can analyze the map before sharing it is a web layer. You'll need to resolve the error manually before you can overwrite web layers using arcpy.

Best,

Jonah

0 Kudos
MarieSchubert
New Contributor II

Hey Jonah,

thanks for your reply. When I analyse the layers manually  no errors occur.

 

I never had the problem with arcpy before, just this time. I don't know what to do...

0 Kudos
JonahLay
Esri Contributor

Hi Marie,

Are you sure that you are referencing the correct project and map? It looks like the layer in question is "'L0polygons." Trying checking this layer's fields for this issue. If you are still having trouble, try contacting technical support: https://support.esri.com/en/contact-tech-support

Best,

Jonah

0 Kudos
MarieSchubert
New Contributor II

Hi Jonah,

thanks for the hint! I had a grouped layer called polygons in my content. I removed it and now it works!

I don't quite understand why, I never referenced the layer. That's why I didn't considered this layer to be the problem.

Thank you very much for your help!

 

0 Kudos