A Python script cursors through a set of 6,743 measured routes and uses SelectLayerByLocation with the WITHIN argument to select the route's underlying arcs. The script begins normally and produces the desired results, but it eventually wrecks, and never at the same record. In several trial runs, it has successfully processsed anywhere between 582 records on the low end and 1,842 records on the high end.
Script coding appears valid, as desired results are consistently produced. I don't think it is a data problem because the script never wrecks in the same place, or near to the same place. In my view, that just leaves a breakdown in processing.
Any suggestions or insights would be appreciated.