Closed gaolig closed 8 years ago
I have been able to determine that this is being caused by null geometry. Running the "Repair Geometry" GP Tool appears to fix the issue.
However, our data resides in SDE, and the Repair Geometry tool does not work with SDE data. I ended up exporting the data from SDE to a file GDB, running the Repair Geometry tool, and then re-importing the data back into SDE.
Since this isn't an issue with the code, my only suggestion/thought would be to provide better output on the returned error message. Hopefully, at least, this post is helpful to others who encounter the same problem.
Can you send me a copy of the bad data so I can test and trap the issue? Mmiller@esri.com
Thanks Mike. I sent an email with a file geodatabase containing the feature class with null geometry.
I edited the versioned (good) data in SDE by creating (6) features, and then tried running the script again. It added all rows to the feature service except for the ones that I had just created. The total count displayed was correct at 8,580; however only 8,574 rows were added to the feature service.
8574/8580 features added 8574 features added
I also reconciled and posted to default, and tried again, but get the same result.
If I export the above feature class to a file GDB, then the script adds all 8,580 rows.
Are there any known issues with using SDE or versioned data?
I did not get the email, can you verify it was sent. I am not aware of any issues with versioned data
Thanks for the data. I enhanced the function to report out the bad features and provide more details along the way. https://github.com/Esri/ArcREST/commit/fc201f38f179b232695b60afcc1619f61548e2d6
One thing that this exposed is how our chunking logic fails on non sequential OIDs. So I added logic that uses numpy to get a list of OIDs to build the sql statements to use equal chunks. https://github.com/Esri/ArcREST/commit/fbee46282c59e77babc077c30322861f7f3a3cff
Here is the example output: 8580 features in layer 2000 features in the chunk Error info: {u'success': False, u'globalId': u'7CF9BBB2-FA6F-4DD2-BDA3-65084F39FCC2', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} 1999 features added in this chunk 1999/8580 features added, 1 errors 2000 features in the chunk 2000 features added in this chunk 3999/8580 features added, 1 errors 2000 features in the chunk Error info: {u'success': False, u'globalId': u'BA627EC9-FF1B-42B5-BF25-1D103E2A2DCB', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'DA678DB5-7FDB-4AD4-A56A-C62D90344F22', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'34269B5F-353D-47C8-BEC8-E17D854F28C3', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} 1997 features added in this chunk 5996/8580 features added, 4 errors 2000 features in the chunk Error info: {u'success': False, u'globalId': u'92A1FF60-A3A1-4EA3-8A6B-EDD9532895E4', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'ECBBE25F-B682-40EC-BC7B-BD51145CACA4', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'DB97AC33-A3B1-48BD-B2F9-B6AFDF382FD3', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'939F22C6-198D-41AC-8D94-F25D37ED0EB8', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} 1996 features added in this chunk 7992/8580 features added, 8 errors 580 features in the chunk Error info: {u'success': False, u'globalId': u'05A6BFC5-60DB-47C3-BF56-C3586EBDD18B', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'951B39FB-1BA3-4B10-A929-C3582313F375', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'9622036A-E501-4840-AEBE-006613CE4BB8', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'4274CEE2-C356-40AD-BCDB-13AEF1D849E3', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} Error info: {u'success': False, u'globalId': u'2470B5D2-74D8-40A5-A504-79E4E1BE274F', u'objectId': None, u'error': {u'code': 1000, u'description': u'24126: Point coordinates cannot be infinite or not a number (NaN).'}} 575 features added in this chunk 8567/8580 features added, 13 errors 8580 features processed
I am receiving the subject error when running the sample "adds_rows_to_service.py". The error occurs after most of the rows are added to the service:
I have tried with a couple different feature services and get the same results. The services have around 8,000 records with ~30 fields.
The code is below, which is the same as the sample except for the variables. I have also tried various chunk sizes.
Thanks in advance for any help!