0

While running a Dissolve, when using statistics fields, I keep getting an error that the parameters are not valid.

enter image description here

Here is my code:

toBeDissolved = r"D:\TestingAfterMeeting\toBeDeletedTestingData\output.shp"
output = r'D:\TestingAfterMeeting\toBeDeletedTestingData\TestingDissolve\output_diss.shp'

arcpy.Dissolve_management(toBeDissolved,output,dissolve_field='Code_CLDC',statistics_fields=[['Code_DDA','LAST'],['Code_Provi','LAST'],['Number_CLD ','LAST']])

Been looking at it for a while... maybe someone else sees the mistake.

1

Great... the second it is posted I spot the mistake.

There was an extra white space in one of my fields (Number_CLD). I wish the error messages in ArcPy were sometimes more helpful.

Here is the working code:

toBeDissolved = r"D:\TestingAfterMeeting\toBeDeletedTestingData\output.shp"
output = r'D:\TestingAfterMeeting\toBeDeletedTestingData\TestingDissolve\output_diss.shp'

arcpy.Dissolve_management(toBeDissolved,output,dissolve_field='Code_CLDC',statistics_fields=[['Code_DDA','LAST'],['Code_Provi','LAST'],['Number_CLD','LAST']])

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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