Field Calculate in Python Script

277
1
12-03-2013 03:25 PM
AndrewRadford
New Contributor
Hi,

I am trying to use the field calculator in a stand alone python script. I am trying:

expression = '(!"infield"!)*2'
arcpy.CalculateField_management(inshape,infield,expression,"PYTHON").

I am getting this error: ExecuteError: ERROR 000539: Invalid field "infield".

I think the syntax is right... any thoughts are greatly appreciated.

Thanks!
Tags (2)
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus
check the examples in calculatefield_management, I think your double quotes are wrong in the expression
0 Kudos