I am trying to add (ie "Author", "LastUpdated") to feature classes within a gdb and then populate each of those fields. I have been able to get my code to run properly for the numerical field but I cannot get it to run for the text field.
fcList = arcpy.ListFeatureClasses() fieldName1 = "Author" expression1 = "John Doe" for fc in fcList: arcpy.AddField_management(fc,fieldName1, "TEXT") arcpy.CalculateField_management(fc, fieldName1, expression1, "PYTHON")
My code returns this error:
ExecuteError: ERROR 000539: <type 'exceptions.SyntaxError'>: unexpected EOF while parsing (<expression>, line 1) Failed to execute (CalculateField).
How can I fix this? Thanks!!