Error 999999 no locator with that name exists

Discussion created by Lady_Jane on Feb 1, 2011
Latest reply on Feb 1, 2011 by Lady_Jane
Hi everyone,
the code below is giving me this error:
<type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function.
A locator with this name does not exist

The code has been working flawlessly with a fgdb fc for catchmentsFC, now I am trying to use it on a different dataset (still a fgdb fc) and it is giving me the above error.
All I did was change the field name for the dissolve and make feature layer processes.
In the code below I added a field variable "catchmentField" which gets its values from catchmentsFC.
Even if I try and put the code back exactly the way it was and use it on the exact same dataset as before, it no longer works.  I must be missing something.

# Import Modules
import arcgisscripting
# Create Geoprocessor object
gp = arcgisscripting.create(9.3)
gp.overwriteoutput = True
# Set up parameters
attribute = gp.GetParameterAsText(0) #String
catchmentsFC = gp.GetParameterAsText(1) #FeatureLayer
tempWorkspace = gp.GetParameterAsText(2) #Workspace
utmZone = gp.GetParameterAsText(3) #String
tableFolder = gp.GetParameterAsText(4) #Workspace
tableName = gp.GetParameterAsText(5) #String
catchmentField = gp.GetParameterAsText(6) #Field
tableView = tableFolder + "\\" + tableName
gp.Workspace = tempWorkspace
wsDesc = gp.Describe(tempWorkspace)
wsType = wsDesc.WorkspaceType


elif attribute == "Road Length":
    #~ find the roads feature class
    RoadsFC = r"F:\Lorna\OriginalData\ORN\sc21-lio-2009-09-17-170455-437918\spatial\ornsegad\ornsegad.shp"
    #~ if the selected temp workspace is a folder
    if wsType == "FileSystem":
        #~ create the table from a shapefile
        gp.Intersect_Analysis (catchmentsFC + ";" + RoadsFC, "Intersect.shp", "ALL", "", "LINE")
        #gp.Dissolve_management ("Intersect.shp", "Dissolve.shp", catchmentField + ";" + "NAT_CLASS", "", "MULTI_PART", "")
        gp.Dissolve_management ("Intersect.shp", "Dissolve.shp", "UCID; NAT_CLASS", "", "MULTI_PART", "")
        #gp.MakeTableView_management("Dissolve.shp", tableView, "", "", catchmentField + " Catchment VISIBLE; NAT_CLASS Road_Type VISIBLE")
        gp.MakeTableView_management ("Dissolve.shp", tableView, "", "", "UCID Catchment VISIBLE; NAT_CLASS Road_Type VISIBLE")
        RoadLength = "RoadLength"
        gp.AddField_management (tableView, RoadLength, "DOUBLE", "#", "#", "", "RoadLength", "NULLABLE", "NON_REQUIRED", "")    
        gp.CalculateField_management("Dissolve.shp", RoadLength, "!" + gp.describe("Dissolve.shp").shapefieldname + ".LENGTH@METERS!", "PYTHON", "")
        gp.TableToDbase_conversion (tableView, tableFolder)
    #~ if the selected temp workspace is a geodatabase
    elif wsType == "LocalDatabase":
        #~ create the table from a geodatabase feature class
        gp.Intersect_Analysis (catchmentsFC + ";" + landCoverFC, "Intersect", "ALL", "", "LINE")
        gp.Dissolve_management ("Intersect", "Dissolve", catchmentField + "; NAT_CLASS", "", "MULTI_PART", "")
        gp.MakeTableView_management("Dissolve", tableView, "", "", catchmentField + " Catchment VISIBLE; NAT_CLASS Road_Type VISIBLE; Shape_Length RoadLength VISIBLE")
        gp.TableToDbase_conversion (tableView, tableFolder)
    print 'done'