barb_tms

simple check for field script started giving error message

Discussion created by barb_tms on Apr 2, 2012
Latest reply on Apr 4, 2012 by kimo
I have a simple script which checks to see if a field exists in a table.  Until a few days ago, I had no trouble with this, but now, when I call this script from within a script, I get this error:

AttributeError: <unprintable AttributeError object>
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 29-37: ordinal not in range(128)

I have uninstalled and re-installed ArcGIS Desktop and I'm still getting this error whenever I try to set a variable by running another script as in: var = arcpy.FieldCheck_AgTools(intab, fieldname).  Running the script by double clicking it in the toolbox works fine.

Any ideas about how to fix this or what's going on?  My Layers, tables, fields, etc, do not contain any special characters or spaces.  I don't understand why it worked one day and quit working the next.  Any input is appreciated.

Outcomes