I am trying to run points to line tool for my feature class of points. Each point has an associated pair which can be identified by the line field "ORIG_FID". I've QA/QC the data to ensure there are no unique values and there are only pairs for this field. Below is the script for this tool with my inputs:
arcpy.management.PointsToLine(
Input_Features="channel_boundaries_range",
Output_Feature_Class=r"C:\Users\kennkath\Desktop\LabWork\Thesis\Methods\Chapter2\Alsea_Katie\Alsea_Katie\channel_boundaries_range_widths1.shp",
Line_Field="ORIG_FID",
Sort_Field=None,
Close_Line="NO_CLOSE",
Line_Construction_Method="CONTINUOUS",
Attribute_Source="NONE",
Transfer_Fields=None
This is the error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4623, in PointsToLine
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4620, in PointsToLine
retval = convertArcObjectToPythonObject(gp.PointsToLine_management(*gp_fixargs((Input_Features, Output_Feature_Class, Line_Field, Sort_Field, Close_Line, Line_Construction_Method, Attribute_Source, Transfer_Fields), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 520, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: TypeError: fields size must match size of the row
Failed to execute (PointsToLine).