AnsweredAssumed Answered

Item not found in this collection error - UpdateCursor on Query Table

Question asked by DanEvans83 on Jan 28, 2015
Latest reply on Jan 28, 2015 by jamesfreddyc

The following code:

 

with arcpy.da.UpdateCursor("QueryTable", ("SHAPE", "leakage_with_pon_list_Eastings", "leakage_with_pon_list_Northings", "leakage_with_pon_list_RandomNumber")) as cursor:
  for row in cursor:
  row[1] = row[0].positionAlongLine(row[3], True).X
  row[2] = row[0].positionAlongLine(row[3], True).Y

  cursor.updateRow(row)

fails with an "item not found in this collection" error, apparently on line 02. Is it not possible to use an update cursor on a query table or something?

Outcomes