I have a python script that was get coordinate points (Longitudinal and latitudinal coordinate ) from excel and writing them to an arcpy.Array and then writing the array to an already existing feature class as a polyline. but line created finished offset the point ,and vertices of creating line less than numbers of points.
You appear to be using the original ArcPy cursors, as opposed to the ArcPy Data Access cursors that were introduced in 10.1. I recommend switching to the DA cursors and then re-post your question if you are still having issues: Accessing data using cursors—Help | ArcGIS Desktop
I always make my polylines like this, so no idea if this will help:
polyline=arcpy.Polyline(array)
row.setValue(shapename, polyline)
For the offset, you probably need to include a spatial reference:
spatref_epsg = 4326 #https://spatialreference.org/ref/epsg/wgs-84/
arcpy.CreateFeatureclass_management(out_path=folder, out_name=shapename,geometry_type='POLYLINE', spatial_reference=arcpy.SpatialReference(spatref_epsg))
thanks, offset reason is lack of spatial reference indeed.