enter image description hereenter image description hereI am brand new to the world of GIS and I have never used Python.

I tried running a calculate field command within the geoprocessing toolbox (not python) and I got an error. I did a bunch of split line functions to split long lengths of sewer mains into shorter stretches. I split them manhole to manhole. However, in the attribute table (field name - shape_Leng) the length of each split line stays the same as the original length of the longer line. But in a different field (field name - Shape.STLength()) it does update to the actual length of the split line. I am trying to run a field calculation to make shape_Leng = Shape.STLength() but I am getting an error.

The reason I am trying to make them equal is because I am trying to integrate it with cartegraph and Cartegraph reads the length of main from the shape_Leng field, whereas I want it to read from the Shape.STLength() field which is the updated length after the split.

I am also trying to figure out how to make cartegraph read from a different field, but have not figured that out yet either.

The error I get from the geoprocessing toolbox function is:

Parameters Input Table arcgis.SDE.SANITARY_SEWER_MAIN Field Name Shape_Leng Expression !Shape.STLength()! Expression Type PYTHON_9.3 Code Block Updated Input Table arcgis.SDE.SANITARY_SEWER_MAIN Messages Start Time: Friday, January 12, 2018 8:23:53 AM ERROR 000539: Error running expression: GPVARIANTOBJECT0.STLength() Traceback (most recent call last): File "", line 1, in AttributeError: DescribeGeometry: Get attribute STLength does not exist Failed to execute (CalculateField). Failed at Friday, January 12, 2018 8:24:09 AM (Elapsed Time: 15.18 seconds)

  • I am using ArcGis Pro.
    – J.S.
    Jan 12, 2018 at 14:12
  • I just added a screenshot to the original post
    – J.S.
    Jan 12, 2018 at 14:13
  • And another screenshot of the error.
    – J.S.
    Jan 12, 2018 at 14:15
  • In your calculate field image, try the field "shape" which should give you the shape.length option in the helpers column. Also change it from Python_9.3 to Python.
    – MacroZED
    Jan 12, 2018 at 14:37
  • Got it, thanks so much. It worked and all fields updated. Thanks again.
    – J.S.
    Jan 12, 2018 at 15:27

1 Answer 1


In your calculate field, use the field “shape” which should give you the shape.length option in the helpers column. Also, change it from “python_9.3” to “python”.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.