<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error 999999 no locator with that name exists in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-999999-no-locator-with-that-name-exists/m-p/173113#M13340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I had a penny for every time I spent all day trying to solve a problem only to figure it out the second after i post it to this forum...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the catchmentField variable to the bottom of the list of variables in python, but in the toolbox window I had moved it up to third place.&amp;nbsp; The problem was caused by my forgetting to rearrange the index values in python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Feb 2011 18:47:27 GMT</pubDate>
    <dc:creator>LornaMurison</dc:creator>
    <dc:date>2011-02-01T18:47:27Z</dc:date>
    <item>
      <title>Error 999999 no locator with that name exists</title>
      <link>https://community.esri.com/t5/python-questions/error-999999-no-locator-with-that-name-exists/m-p/173112#M13339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the code below is giving me this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;type 'exceptions.RuntimeError'&amp;gt;: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A locator with this name does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All I did was change the field name for the dissolve and make feature layer processes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code below I added a field variable "catchmentField" which gets its values from catchmentsFC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&amp;nbsp; I must be missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# 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":
&amp;nbsp;&amp;nbsp;&amp;nbsp; #~ find the roads feature class
&amp;nbsp;&amp;nbsp;&amp;nbsp; RoadsFC = r"F:\Lorna\OriginalData\ORN\sc21-lio-2009-09-17-170455-437918\spatial\ornsegad\ornsegad.shp"
&amp;nbsp;&amp;nbsp;&amp;nbsp; #~ if the selected temp workspace is a folder
&amp;nbsp;&amp;nbsp;&amp;nbsp; if wsType == "FileSystem":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #~ create the table from a shapefile
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Intersect_Analysis (catchmentsFC + ";" + RoadsFC, "Intersect.shp", "ALL", "", "LINE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #gp.Dissolve_management ("Intersect.shp", "Dissolve.shp", catchmentField + ";" + "NAT_CLASS", "", "MULTI_PART", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Dissolve_management ("Intersect.shp", "Dissolve.shp", "UCID; NAT_CLASS", "", "MULTI_PART", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #gp.MakeTableView_management("Dissolve.shp", tableView, "", "", catchmentField + " Catchment VISIBLE; NAT_CLASS Road_Type VISIBLE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MakeTableView_management ("Dissolve.shp", tableView, "", "", "UCID Catchment VISIBLE; NAT_CLASS Road_Type VISIBLE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RoadLength = "RoadLength"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddField_management (tableView, RoadLength, "DOUBLE", "#", "#", "", "RoadLength", "NULLABLE", "NON_REQUIRED", "")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CalculateField_management("Dissolve.shp", RoadLength, "!" + gp.describe("Dissolve.shp").shapefieldname + ".LENGTH@METERS!", "PYTHON", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.TableToDbase_conversion (tableView, tableFolder)
&amp;nbsp;&amp;nbsp;&amp;nbsp; #~ if the selected temp workspace is a geodatabase
&amp;nbsp;&amp;nbsp;&amp;nbsp; elif wsType == "LocalDatabase":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #~ create the table from a geodatabase feature class
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Intersect_Analysis (catchmentsFC + ";" + landCoverFC, "Intersect", "ALL", "", "LINE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Dissolve_management ("Intersect", "Dissolve", catchmentField + "; NAT_CLASS", "", "MULTI_PART", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MakeTableView_management("Dissolve", tableView, "", "", catchmentField + " Catchment VISIBLE; NAT_CLASS Road_Type VISIBLE; Shape_Length RoadLength VISIBLE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.TableToDbase_conversion (tableView, tableFolder)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'done'&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 18:36:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-999999-no-locator-with-that-name-exists/m-p/173112#M13339</guid>
      <dc:creator>LornaMurison</dc:creator>
      <dc:date>2011-02-01T18:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error 999999 no locator with that name exists</title>
      <link>https://community.esri.com/t5/python-questions/error-999999-no-locator-with-that-name-exists/m-p/173113#M13340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I had a penny for every time I spent all day trying to solve a problem only to figure it out the second after i post it to this forum...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the catchmentField variable to the bottom of the list of variables in python, but in the toolbox window I had moved it up to third place.&amp;nbsp; The problem was caused by my forgetting to rearrange the index values in python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 18:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-999999-no-locator-with-that-name-exists/m-p/173113#M13340</guid>
      <dc:creator>LornaMurison</dc:creator>
      <dc:date>2011-02-01T18:47:27Z</dc:date>
    </item>
  </channel>
</rss>

