Adding Features to layer error

555
1
Jump to solution
01-17-2019 06:27 AM
OisinSlevin
New Contributor III

Hi,
I keep running into this issue when trying to add polygons to my feature layer, 

My code basically pulls down a feature from a layer, 

modifies some of the text fields

then attempts to upload the feature to a different feature layer 

The same code works fine for line and point geometry data 

I also strip out any fields that are auto populated ex GlobalID and OBJECTID so this unique identifier is not something I feed in.

an_object={
"geometry":object.SHAPE,
"attributes":attributes
}
add_result=some_layers[6].edit_features(adds=[an_object])


{'addResults': [{'objectId': None, 'uniqueId': None, 'globalId': '09846522-E815-405F-98C5-22991AA70D59', 'success': False, 'error': {'code': 1000, 'description': 'Conversion failed when converting from a character string to uniqueidentifier.'}}], 'updateResults': [], 'deleteResults': []}

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
OisinSlevin
New Contributor III

Found the issue, The features layer had user attributes which were "esriFieldTypeGUID" and if you leave them null, but leave them in the "attributes" while adding them , then it throws this error.

View solution in original post

1 Reply
OisinSlevin
New Contributor III

Found the issue, The features layer had user attributes which were "esriFieldTypeGUID" and if you leave them null, but leave them in the "attributes" while adding them , then it throws this error.