I am having trouble adding rows to a shapefile after it has been created. I'm not sure if I need to create the shapefile in memory and add the data or creating then re-open the file. While I've attempted to re-open the file, it will exit code 1 that file doesn't yet exist. Any and all suggestion would be useful. (except setting it on fire). I'm getting a "AttributeError: Row: Error in parsing arguments for SetValue" .... Please help.
for row in arcpy.da.SearchCursor(featureClass, ['FID','SHAPE@JSON','STREAM_ID','REACH_ID','SR_ID','STATION','INTERP','XS_ID','WSP001','WSP002','WSP003','WSP004','WSP005','WSP006','WSP007']):
featureClassData.append([row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10],row[11],row[12],row[13],row[14]])
outPutPath = "C:\\projectTemp\\FloodAnalysis\\output"
for i in range(0, len(featureClassData) -1):
FirstRowData = featureClassData[i]
SecondRowData = featureClassData[i+1]
FirstRowData[1] = eval(FirstRowData[1])
for cord in FirstRowData[1]['paths']:
for c in cord:
point = arcpy.Point(c[0],c[1])
dataSetCreate = arcpy.CreateFeatureclass_management(outPutPath, 'test_section_' + `i` ,"", featureClass)
dataSet = arcpy.InsertCursor(dataSetCreate)
row1 = dataSet.newRow()
row1.Shape = arcpy.geometries.Polyline(array1,spatialRef)
row1.setValue(FirstRowData[2], FirstRowData[3], FirstRowData[4],
FirstRowData[5], FirstRowData[6], FirstRowData[7],
float(FirstRowData[8]), float(FirstRowData[9]), float(FirstRowData[10]),
float(FirstRowData[11]), float(FirstRowData[12]),
float(FirstRowData[13]), float(FirstRowData[14]))
dataSet.insertRow(row1)