sebastian_4m

Unknown exception when running python script

Discussion created by sebastian_4m on May 25, 2012
Latest reply on May 28, 2012 by mzcoyle
Hi,
I have been running a python script that applies some spatial analysis functions iteratively to a dataset successfully in the past.  Now without me making any change in the algorithm it stopped working and I'm getting this exception message

#################
Traceback (most recent call last):
  File "C:\Python26\ArcGIS10.0\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Users\Sebastian\Documents\py_codes\test\mycode.py", line 48, in <module>
    outCostDist = CostDistance(element, cost, maxDist)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 644, in CostDistance
    out_backlink_raster)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Utils.py", line 47, in swapper
    result = wrapper(*args, **kwargs)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 638, in wrapper
    out_backlink_raster)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>
    return lambda *args: val(*gp_fixargs(args))
ExecuteError: ERROR 999999: Error executing function.
A locator with this name does not exist.
Failed to execute (CostDistance).
#############

The variables in "outCostDist = CostDistance(element, cost, maxDist)" are well defined:
           type(element) = <class 'arcpy.arcobjects.geometries.PointGeometry'>
           type(cost) = 'str'
           type(maxDist) = int

The algorithm is correct, the files used and to be generated are small and no rule regarding naming or paths has been broken

Does anyone know or have a clue on what's going on?


ERROR FOUND AND SOLVED.  THANK YOU FOR READING

Outcomes