AnsweredAssumed Answered

ValueError: Row: Invalid Input Type For Set Value

Question asked by deleted-user-7XK9IcRUo5op on Nov 29, 2018


I'm attempting to roll through a bunch of edits per user input on a point feature. Unfortunately, i get this script to work on non-geometric network features with the arcpy.da editing functions. I'm attempting to use the arcpy.insertCursor here because of that geometric network participation on this point feature. I keep getting this error:


On Line 65 - ValueError: Row: Invalid input value for SetValue


Code is as follows:


import arcpy, time, datetime, os

#Set variables

FilePath = "E:\\Program Files\\Consumers Energy\\SIMS\\MassEdit\\"
SDEUser = (FilePath + "Dev_GasDist_PrimeSDE.sde")                                                                 #SDE connection
VsdeFolder = (FilePath + "SDExnnections")
VersionList = []                                                                                                         #mutable list
VersionCount = 0                                                                                                         #var for amount of versions on mappingdefault
MX = 5000                                                                                                                   #maximum allowed edits
UserInput = int(input('Edits Needed (Divided per versions in mapping default): '))                         #total edits input by user
TotalEdits = UserInput if UserInput < 5000 else MX                                                                  #var for edits
fieldsPoly = ('Shape@')                                                                                                         #fields to fill in for edits
fieldsPoint = ('SHAPE@X','SHAPE@Y')
counterV = 0                                                                                                              #version counter
counterR = 0          

def makeCurbValve(MoveBy2):
     pCurbValve = arcpy.Point(3289001.0213 + MoveBy2,4376077.827 + MoveBy2)
     return arcpy.PointGeometry(pCurbValve)

For ChildVersionName in VersionList:
     counterV = int(counterV + (int(VersionCount) + 8500))
     EditVersion = arcpy.CreateDatabaseConnection_management('''''''')
     T_SDEConnection = (str(EditVersion))
     fc = (T_SDEConnection + "\\GASDIST.P_CurbValve")
     workspace = os.path.dirname(fc)
     Edit = arcpy.da.Editor(workspace)
     Edit.startEditing(False, True)
     cursorInsert = arcpy.InsertCursor(T_SDEConnection + "\\GASDIST.P_CurbValve")
     for ChildVersionCount in range(0, int((TotalEdits)/VersionCount)):
          counterR = int(counterR + 5)
          start = time.time()
          CoordXY = makeCurbValve(counterR + counterV)
          InsertNewRow = cursorInsert.newRow()
          end = time.time()