Unexpected EOF while parsing...

7980
1
09-07-2010 07:13 AM
ChristinaHerrick1
New Contributor
Hello,

I am trying to write a python script that concatenates two fields in a polygon shapefile.  Whenever I run it, I get this message:

<class 'arcgisscripting.ExecuteError'>: ERROR 000539: Error running expression: P13 R1 <type 'exceptions.SyntaxError'>: unexpected EOF while parsing (<string>, line 1)
Failed to execute (CalculateField).

Failed to execute (pathrow).

The "P13 R1" refers to the attributes I'm trying to concatenate in first record in the shapefile, so I know that the script can read the shapefile.  However it doesn't actually calculate the field nor does it move on to the next record(s).  The two fields in the attribute table are titled 'PATH' and 'ROW' and are listed as SHORT fields in the attribute table's field properties.

Does anyone know what this error means or have any suggestions on how to fix it?  I attached the script.

Thanks in advance!

Chris
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus
assuming that the script is as posted, this row in the while loop of the script...
row = records.next()
should be indented to match the above lines, since the script appears to have been generated from modelbuilder, there may be an error in the export option.
0 Kudos