The tool you have downloaded is very useful, I myself have used it several times. However, it cannot handle non-English characters like ä, ö, é, ü etc. These characters can't be in the file name, field names, or in your data. The unicode character for xf6
in your error message above corresponds to ö
, so it is likely that this is your problem.
I have created a code to replace those characters which usually appears in my data, in order for me to be able to use Change detector. It aint all that pretty, but it gets the work done. I have set it up as a script tool with Input shapefile as first parameter, and the field to which you want to do changes as second input. It applies changes to your source data, so make sure you have a backup.
# -*- coding: cp1252 -*-
def code(infield):
data = ''
for i in infield:
## print i
if i == u'\xc4': #Ä
data = data + 'AE'
elif i == u'\xe4': #ä
data = data + 'ae'
elif i == u'\xc5': #Å
data = data + 'AA'
elif i == u'\xe5': #å
data = data + 'aa'
elif i == u'\xd6': #Ö
data = data + 'OE'
elif i == u'\xf6': #ö
data = data + 'oe'
else:
data = data + i
return data
shp = arcpy.GetParameterAsText(0)
field = arcpy.GetParameterAsText(1)
##newfield = field + '_U'
##arcpy.AddField_management(shp, newfield, 'TEXT')
prows = arcpy.UpdateCursor(shp)
for row in prows:
row.field = code(row.getValue(field))
prows.updateRow(row)
Also keep in mind, the download page states that the function is created for 10.1. I doubt there's been such major changes between 10.1 and 10.2 that it would affect the successful completion of the script, but there's still a chance.