arcpy error after installin sp2

Discussion created by sebastian_4m on Feb 2, 2012
Latest reply on Feb 2, 2012 by mzcoyle
When trying to run a code that used to run fine, I am getting the following error

Traceback (most recent call last):
File "C:\Users\Sebastian\Documents\py_codes\cost_distance\", line 55, in <module>
outCostDist = CostDistance(element, cost, maxDist)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\", line 644, in CostDistance
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\", line 47, in swapper
result = wrapper(*args, **kwargs)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\", line 638, in wrapper
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\", 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).

relavant pieces of my code are:
import arcpy
from import *

something else....

for row in rows:
outCostDist = CostDistance(element, cost, maxDist) # this is the part that is crashing


I'm really frustrated because of the only modification I did was "upgrading" to sp2. I even uninstalled sp2 and reinstalled arcgis all over again just to find out that the error remains. Please any help!!