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()[2] 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.?
Python version I suspect
and the link therein
GIS Geek: Set 32bit Executable LARGEADDRESSAWARE Flag to True
Check out PRO to see if the functionality is there should you wish to use a newer version of Python