When I solve for the nearest facility in python I get this error:
An error occured on line 122
ERROR 030024: Solve returned a failure.
Failed to execute (Solve)
The problem is I don’t have any info on why the solve failed.
try: arcpy.Solve_na(naNearFacil, "SKIP", "TERMINATE", "") arcpy.RefreshActiveView() except Exception as e: # If an error occurred, print line number and error message import traceback, sys tb = sys.exc_info() print "An error occured on line %i" % tb.tb_lineno print str(e)
I only get the error if I am running the script via idle and it works fine as a python tool in the MXD. It also works fine in idle if the input facility list is smaller. So I guess it could be a memory issue.
Any ideas on what the problem is or at least how to get more info on why the solve failed.?