I am working on an arcpy script to create a polyline feature class with a single polyline feature between each 2 points in a sequence of points. I use a search cursor to first create a table with all the necessary data, including the start and end point coordinates for each record. Then I use an update cursor to load the data into a polyline feature class. The output feature class has a row for every record, but is missing the geometry for most, but not all of the polylines I want to create. I've tried rewriting it several ways, always with similar results. Any ideas on how to fix this?
rowsTbl = arcpy.da.SearchCursor(attributeTable, ['SURSEGUID', 'TRACKSEGMENT', 'START_TIME', 'END_TIME', 'START_X', 'START_Y', 'END_X', 'END_Y']) #New polyline featureclass fields = ['SHAPE@', 'SURSEGUID', 'TRACKSEGMENT', 'START_TIME', 'END_TIME'] with arcpy.da.InsertCursor(tempOutFC, fields) as cursorTbl: for row in rowsTbl: array = arcpy.Array() point = arcpy.Point() point.X = (row) point.Y = (row) array.add(point) del point point = arcpy.Point() point.X = (row) point.Y = (row) array.add(point) del point #Create polyline from the array polyline = arcpy.Polyline(array) #Clear array for future use array.removeAll() #Append to the list of polyline objects cursorTbl.insertRow([polyline,row, row, row, row]) del polyline del cursorTbl