Select to view content in your preferred language

Error Code 503 - Update Features With Incident Records error

397
2
04-21-2023 12:04 PM
Labels (1)
chrisgermiller_rcpd
New Contributor

Hello one and all. I was attempting to run Update Features With Incident Records tool and am greeted with this ambiguous error when I ran it. 

 

I'd be thrilled if someone can help me!

 

Update Features With Incident Records
=====================
Parameters

Input Table TransformedCrimeData_BatchUpdateFields
Target Features https://services.arcgis.com/J65Mns15CRcll4iw/arcgis/rest/services/Crimes_c625c8cc71b44cf88edc00c5858...
Location Type COORDINATES
X Field x
Y Field y
Coordinate System GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Address Locator
Address Type MULTI_FIELD_ADDRESS
Address Fields
Invalid Records Table
Expression
Update Existing Target Features APPEND
Match Fields
Input Table Last Modified Date Field
Target Features Last Modified Date Field
Update Only Matching Features UPSERT
Update Geometry for Existing Features UPDATE_GEOMETRY
Field Matching Type AUTOMATIC
Field Map callid "callid" true true false 20 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,callid,0,20;offenseid "offenseid" true true false 8 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,offenseid,0,8;nibrscode "nibrscode" true true false 3 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,nibrscode,0,3;nibrsoffense "nibrsoffense" true true false 50 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,nibrsoffense,0,50;nibrsdesc "nibrsdesc" true true false 50 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,nibrsdesc,0,50;nibrscrimeag "nibrscrimeag" true true false 50 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,nibrscrimeag,0,50;city "city" true true false 40 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,city,0,40;state "state" true true false 2 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,state,0,2;zip5 "zip5" true true false 5 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,zip5,0,5;beat "beat" true true false 5 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,beat,0,5;district "district" true true false 5 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,district,0,5;division "division" true true false 4 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,division,0,4;agency "agency" true true false 4 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,agency,0,4;locatedesc "locatedesc" true true false 65 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,locatedesc,0,65;casestatus "casestatus" true true false 80 Text 0 0,First,#,TransformedCrimeData_BatchUpdateFields,casestatus,0,80;reportdate "reportdate" true true false 8 Date 0 0,First,#,TransformedCrimeData_BatchUpdateFields,reportdate,-1,-1;reportyear "reportyear" true true false 4 Long 0 0,First,#,TransformedCrimeData_BatchUpdateFields,reportyear,-1,-1;occurfrdate "occurfrdate" true true false 8 Date 0 0,First,#,TransformedCrimeData_BatchUpdateFields,occurfrdate,-1,-1;occurtodate "occurtodate" true true false 8 Date 0 0,First,#,TransformedCrimeData_BatchUpdateFields,occurtodate,-1,-1;x "x" true true false 8 Double 0 0,First,#,TransformedCrimeData_BatchUpdateFields,x,-1,-1;y "y" true true false 8 Double 0 0,First,#,TransformedCrimeData_BatchUpdateFields,y,-1,-1
Time Format
Updated Target Features https://services.arcgis.com/J65Mns15CRcll4iw/arcgis/rest/services/Crimes_c625c8cc71b44cf88edc00c5858...
=====================
Messages

Start Time: Friday, April 21, 2023 2:24:28 PM
Traceback (most recent call last):
File "<string>", line 6164, in execute
File "<string>", line 5856, in add_features_to_portal_target
File "<string>", line 5778, in send_edits_to_service
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\layer.py", line 2945, in edit_features
return self._con.post_multipart(path=edit_url, postdata=params)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1162, in post_multipart
return self._handle_response(
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 900, in _handle_response
self._handle_json_error(data["error"], errorcode)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 923, in _handle_json_error
raise Exception(errormessage)
Exception: An error occurred.
(Error Code: 503)

Failed to execute (UpdateFeaturesWithIncidentRecords).
Failed at Friday, April 21, 2023 2:36:40 PM (Elapsed Time: 12 minutes 12 seconds)

2 Replies
Laura
by MVP Regular Contributor
MVP Regular Contributor

I am also getting an unexplained error. There was a bug in Pro. I am on 3.3 now and it works fine. 

0 Kudos
CSDFRADMIN
New Contributor II

Same here, I use the APIs edit_features method and it raises an Exception with the message reading "Error Code: 503". The traceback looks identical to yours, something seems to go wrong in the post_multipart function. I checked the layer that caused the error in the transaction, and it doesn't contain any multipart feature.

Did you ever resolve the issue?

 

EDIT (July 31st 2024):

@MehdiPira1's response on Bug with edit_features function? - Python ArcGIS A... - Esri Community has resolved the issue for me: I implemented arcpy's RepairGeometry method before the edit_feature and that seems to have solved the problem.

  

0 Kudos