AnsweredAssumed Answered

Confused with this error "list indices must be integers"

Question asked by jpedder on Jul 31, 2012
Latest reply on Jul 31, 2012 by jpedder
Morning, I'm receiving this error when running a For loop "list indices must be integers". Could this be because my list is of stype string?

Here's the code. First I write values to list lMembers
rowMembers = arcpy.SearchCursor(fc6,qTeam)     lMembers = []     for z in rowMembers:         mName = z.getValue("Name")         lMembers.append(mName) 


Then I later try to write these values. Currently I'm just displaying them for debugging.
    for i in lMembers:         wMembers = lMembers[i]         arcpy.AddMessage(lMembers[i])         arcpy.AddMessage(wMembers)


Not quite sure what I'm doing incorrectly

thanks in advance for you help

Jon

Outcomes