I've got a script which loops through a series of FC layers (tracker points). Using a FOR loop, they're reprojected then joined to a streets layer.
Sometimes it works fine, then other times it never completes the spatial join and stays hanging in debugging mode & I have to manually stop it. It does the reproject OK, just not the join.
Any idea why it might be doing this?
for tracker in trackerPoints: trackerLoc = workingFolder +"\\" + tracker gpsReproject = gpsID + "_Reproject" arcpy.Project_management(trackerLoc,gpsReproject,"PROJCS['TM65_Irish_Grid',GEOGCS['GCS_TM65',DATUM['D_TM65',SPHEROID['Airy_Modified',6377340.189,299.3249646]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',200000.0],PARAMETER['False_Northing',250000.0],PARAMETER['Central_Meridian',-8.0],PARAMETER['Scale_Factor',1.000035],PARAMETER['Latitude_Of_Origin',53.5],UNIT['Meter',1.0]]","TM65_To_WGS_1984_2","GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]") gpsJoin = gpsID + "_Join" arcpy.SpatialJoin_analysis(gpsReproject,streets,gpsJoin,"JOIN_ONE_TO_ONE","KEEP_ALL","","CLOSEST","#","Distance") # Spatial Join streets & tracker points