I am trying to select a point from a point layer that intersect a polyline layers firstpoint and using arcpy. I am getting an error "ExecuteError: ERROR 000622: Failed to execute (Select Layer By Location). Parameters are not valid. ERROR 000623: Invalid value type for parameter select_features."
import arcpy
def main():
arcpy.env.workspace = r'D:\My Documents\SR91_FeasibilityStudy\GISData\SR-91.gdb'
arcpy.MakeFeatureLayer_management('Build2035', 'plLayer') #polyline Layer
arcpy.MakeFeatureLayer_management('Build2035_pts_CollectEvents', 'ptLayer') #point Layer
with arcpy.da.SearchCursor('plLayer',("Shape@","OID@")) as cursor:
for row in cursor:
arcpy.SelectLayerByLocation_management('ptLayer','intersect',row[0].firstPoint)
result = arcpy.GetCount_management('ptLayer')
print result