JLuymes

Cursor Update Issue

Discussion created by JLuymes on Dec 2, 2011
Latest reply on Dec 4, 2011 by lpinner
Hi,

I have created a fairly simple script to capitalize a field. The field name is "STREET". I Have tried using !STREET! or STREET but this does not work either. I get the following error message:

Traceback (most recent call last):
  File "M:\Scripts\StreetFormat.py", line 32, in <module>
    value = row.GetValue("STREET")
AttributeError: 'builtin_function_or_method' object has no attribute 'GetValue'

Any solutions?
import arcgisscripting, sys, os
gp=arcgisscripting.create(9.3)

main = "M:\Scripts\Export_Output.shp"

cur = gp.UpdateCursor(main)
row = cur.next
while row:
    value = row.GetValue("STREET")
    valueUpper = value.upper()
    row.SetValue("STREET", valueUpper)
    cur.UpdateRow(row)
    row = cur.Next()
del cur, row

Outcomes