<?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: Create a Address Locator in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207188#M15904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what are the folders? (folder) and (out_put_folder) or are you just anonymizing them? or are they parameters?&lt;/P&gt;&lt;P&gt;But I suspect it lies in the quoting within the parameter string if you didn't copy it directly...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-address-locator.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-address-locator.htm"&gt;Create Address Locator—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2018 20:11:04 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2018-11-28T20:11:04Z</dc:date>
    <item>
      <title>Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207185#M15901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a Gazetteer style address locator by python script as:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateAddressLocator_geocoding&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
 in_address_locator_style&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"General Gazetteer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 in_reference_data&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"(folder)\address2.gdb\ADDRESS_LOCATOR 'Primary Table'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 in_field_map&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"'Feature ID' OBJECTID VISIBLE NONE;'*Place Name' ADDRESS VISIBLE NONE;Category &amp;lt;None&amp;gt; VISIBLE NONE;Type &amp;lt;None&amp;gt; VISIBLE NONE;Tags &amp;lt;None&amp;gt; VISIBLE NONE;Description &amp;lt;None&amp;gt; VISIBLE NONE;'3-Digit Language Code' &amp;lt;None&amp;gt; VISIBLE NONE;'2-Digit Language Code' &amp;lt;None&amp;gt; VISIBLE NONE;Rank &amp;lt;None&amp;gt; VISIBLE NONE;Neighborhood &amp;lt;None&amp;gt; VISIBLE NONE;City &amp;lt;None&amp;gt; VISIBLE NONE;County &amp;lt;None&amp;gt; VISIBLE NONE;State &amp;lt;None&amp;gt; VISIBLE NONE;'State Abbreviation' &amp;lt;None&amp;gt; VISIBLE NONE;Country &amp;lt;None&amp;gt; VISIBLE NONE;'Country Abbreviation' &amp;lt;None&amp;gt; VISIBLE NONE;'Street Address' &amp;lt;None&amp;gt; VISIBLE NONE;'Full Address' &amp;lt;None&amp;gt; VISIBLE NONE;'Primary Phone' &amp;lt;None&amp;gt; VISIBLE NONE;'Primary URL' &amp;lt;None&amp;gt; VISIBLE NONE;'Display X' &amp;lt;None&amp;gt; VISIBLE NONE;'Display Y' &amp;lt;None&amp;gt; VISIBLE NONE;'Min X value for extent' &amp;lt;None&amp;gt; VISIBLE NONE;'Max X value for extent' &amp;lt;None&amp;gt; VISIBLE NONE;'Min Y value for extent' &amp;lt;None&amp;gt; VISIBLE NONE;'Max Y value for extent' &amp;lt;None&amp;gt; VISIBLE NONE;'Additional Field' USER_DATA VISIBLE NONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 out_address_locator&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"(out_put_folder)\test.GeocodeServer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 config_keyword&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 enable_suggestions&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ENABLED"&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but got error as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;module1&amp;gt;", line 12, in &amp;lt;module&amp;gt;&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geocoding.py", line 160, in CreateAddressLocator&lt;BR /&gt; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000046: Too many reference data tables for this style.&lt;BR /&gt;Failed to execute (CreateAddressLocator).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try create locator from arcMap and Pro using the same data and successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thing wrong with my python script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207185#M15901</guid>
      <dc:creator>NickXu</dc:creator>
      <dc:date>2021-12-11T10:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207186#M15902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;line 12, which we can't find contains the key.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;will give you line numbers.&lt;/P&gt;&lt;P&gt;It if worked in arcmap, why not copy the code snippet and use it in your code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 19:33:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207186#M15902</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-28T19:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207187#M15903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Line 4 is suspect to me: typically commas separate arguments:&amp;nbsp; You have a feature class named and then it's role and they are space separated...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 20:08:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207187#M15903</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2018-11-28T20:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207188#M15904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what are the folders? (folder) and (out_put_folder) or are you just anonymizing them? or are they parameters?&lt;/P&gt;&lt;P&gt;But I suspect it lies in the quoting within the parameter string if you didn't copy it directly...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-address-locator.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-address-locator.htm"&gt;Create Address Locator—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 20:11:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207188#M15904</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-28T20:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207189#M15905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I find the reason. We use UNC drive, for example, &lt;A href="https://community.esri.com/"&gt;\\foldername\f&lt;/A&gt;, if I change it to forword slash as code sniper did //foldername/ then the py script runs without error. I don't know this is a bug of the address locator py api&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 20:37:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207189#M15905</guid>
      <dc:creator>NickXu</dc:creator>
      <dc:date>2018-11-28T20:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207190#M15906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/get-started/checking-for-existence.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/get-started/checking-for-existence.htm"&gt;Checking for the existence of data—ArcPy Get Started | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is a good idea to check for inputs to functions.&lt;/P&gt;&lt;P&gt;forward slashes are definitely good because backslashes have special meaning in python and a single backslash is an escape character&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 20:46:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207190#M15906</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-28T20:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207191#M15907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a huge fan of the raw string literal functionality that python provides.&amp;nbsp;&amp;nbsp;As I get older, what memory I have left needs to go to things like &lt;EM&gt;where did I park today&lt;/EM&gt; rather escaping back slashes or changing to fore slashes....&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'\\RE-GOLD-16S\GISData$\ParcelCheck2015\ParcelPostSketch.gdb'&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace
u&lt;SPAN class="string token"&gt;'\\\\RE-GOLD-16S\\GISData$\\ParcelCheck2015\\ParcelPostSketch.gdb'&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Notice how all my slashes are escaped for me; this also plays to my laziness:&amp;nbsp; I can copy and past paths from windows explorer or ArcCatalog. In line 2 all I did was copy and past the unc path...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:14:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207191#M15907</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T10:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Address Locator</title>
      <link>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207192#M15908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ran into this error today. Posting my solution here in case someone else makes the same mistake I did, because the error message has little to do with the actual problem in both my case and Nick's original case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me, it had nothing to do with path name and everything to do with my first parameter. I used "General-Gazetteer", which is how it is spelled in the parameter syntax table at&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-address-locator.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-address-locator.htm"&gt;Create Address Locator—Help | ArcGIS Desktop&lt;/A&gt;. Shame on me for following documentation. Evidently, it needs to have spaces on either side of the dash: "General - Gazetteer". To be fair, I do see that their sample code has the spaces, but I always refer to the table for the list of valid parameter values and just look at the sample code&amp;nbsp;when I need help formatting these values (i.e. with the 2nd and 3rd parameters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(And for the record, when I format my first parameter like the code in the original question, "General Gazetteer" with no dash at all, I also get the same error)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 16:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-address-locator/m-p/207192#M15908</guid>
      <dc:creator>JoshAndreas</dc:creator>
      <dc:date>2020-01-29T16:11:29Z</dc:date>
    </item>
  </channel>
</rss>

