AnsweredAssumed Answered

SetValue error

Question asked by Rock_Doc on Oct 14, 2019
Latest reply on Oct 14, 2019 by Rock_Doc

Hi all


Having some issues trying to debug someone else's code in Desktop 10.3, and we've traced the issue back to a SetValue call in the script. Adding in our own messages at various points, it seems to make the new row without any issues, but has a problem with SetValue. Outputting the values of fldID and ID to the screen shows that those values are correct at the time of the function call, but using SetValue fails. 


Any ideas? Appreciate any help!


   VTabNNC = arcpy.InsertCursor(vTabNNPath)

   raise arcpy.ExecuteError("InsertCursor error")

while fRBNDX:
   if len(strLn01) != 0:
      if len(strLn01.split(",")) < 3:
         strLn01 = ""
         #gp.AddMessage("Creating new row...")
         r = VTabNNC.newRow()  #THIS WORKS
         r.SetValue(fldID,ID) #THIS FAILS 
         raise arcpy.ExecuteError("Error creating new row")