<?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: Parentheses Rules in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361594#M28549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would guess you need more than just the primary table referenced for your locator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check out the error&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/000039_Not_enough_reference_data_tables_for_this_style/00vp00000009000039/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/000039_Not_enough_reference_data_tables_for_this_style/00vp00000009000039/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the tool syntax for adding other tables&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002600000004000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002600000004000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specific info on the alternate table&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/The_alternate_name_table/002500000043000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/The_alternate_name_table/002500000043000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Feb 2012 17:44:01 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2012-02-06T17:44:01Z</dc:date>
    <item>
      <title>Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361589#M28544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;import arcpy ## Workspace ## FIPS = "C:\\Users\\D2148\\Documents\\Maps\\FIPS"&amp;nbsp;&amp;nbsp; #FIPSlist = ('001', '003', '005', '007', '009', '011', '013',&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '015', '017', '019', '021', '023', '025', '027', &amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '029', '031', '033', '035', '037', '039', '041', &amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '043', '045', '047', '049', '051', '053', '055', &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp; '057', '059', '061', '063', '065', '067', '069', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp; '071', '073', '075', '077', '079', '081', '083', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; '085', '087', '089', '091', '093', '095', '097', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # '099', '101', '103', '105', '107', '109', '111', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #'113', '115', '117', '119', '121', '123', '125', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #'127') &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FIPSlist = '001'&amp;nbsp; ###### CLEAR SELECTION FIRST ######## for fip in FIPSlist: &amp;nbsp;&amp;nbsp; &amp;nbsp; ## SQL for "Master_TAHI" ##&amp;nbsp;&amp;nbsp; &amp;nbsp; query = "FIPS_PARIS ='" + fip + "'" &amp;nbsp;&amp;nbsp; &amp;nbsp; ## SQL for "All_roads_cityjoin" ## &amp;nbsp; query2 = "Parish_FIP ='" + fip + "'" &amp;nbsp;&amp;nbsp; &amp;nbsp; ## Create FIPS###.dbf from Master_TAHI ## &amp;nbsp; arcpy.TableSelect_analysis("Master_TAHI", FIPS + "\\FIPS" + fip + ".dbf",query) &amp;nbsp;&amp;nbsp; &amp;nbsp; ## Create AllRoadsParish###.shp from All_roads_cityjoin ## &amp;nbsp; arcpy.Select_analysis("All_roads_cityjoin",FIPS + "\\AllRoadsParish" + fip + ".shp",query2) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ## Create Address Locator ## &amp;nbsp; Output_Address_Locator = "C:\\Users\\D2148\\Documents\\Maps\\FIPS\\add" + fip &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; arcpy.CreateAddressLocator_geocoding("US Address - Street Name", "AllRoadsParish" + fip 'Primary Table'", "'Feature ID' OBJECTID VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' &amp;lt;None&amp;gt; VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' Street_Cat VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Right City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Left ZIP Code' ZIPL VISIBLE NONE;'Right ZIP Code' ZIPR VISIBLE NONE;'Left State' STATE VISIBLE NONE;'Right State' STATE VISIBLE NONE;'Left Additional Field' Parish_FIP VISIBLE NONE;'Right Additional Field' Parish_FIP VISIBLE NONE", Output_Address_Locator, "") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;These stupid parentheses keep making me so mad.... Are there rules as how to place parentheses? I can't get this code to work, there is a syntax error on this part.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 13:30:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361589#M28544</guid>
      <dc:creator>NathanBaylot1</dc:creator>
      <dc:date>2012-02-06T13:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361590#M28545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you mean the quotation marks?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your line should look like this &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.CreateAddressLocator_geocoding("US Address - Street Name", "AllRoadsParish" + fip +"'Primary Table'", "'Feature ID' OBJECTID VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' &amp;lt;None&amp;gt; VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' Street_Cat VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Right City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Left ZIP Code' ZIPL VISIBLE NONE;'Right ZIP Code' ZIPR VISIBLE NONE;'Left State' STATE VISIBLE NONE;'Right State' STATE VISIBLE NONE;'Left Additional Field' Parish_FIP VISIBLE NONE;'Right Additional Field' Parish_FIP VISIBLE NONE", Output_Address_Locator, "")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 13:52:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361590#M28545</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-02-06T13:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361591#M28546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;and yes I did mean quotes lol thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 13:57:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361591#M28546</guid>
      <dc:creator>NathanBaylot1</dc:creator>
      <dc:date>2012-02-06T13:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361592#M28547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Those quotes are even messing with my mind!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 14:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361592#M28547</guid>
      <dc:creator>NathanBaylot1</dc:creator>
      <dc:date>2012-02-06T14:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361593#M28548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I get this error now. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size:2;"&gt;&lt;SPAN style="color: #e60000; font-size: 2;"&gt;Runtime error &amp;lt;class 'arcgisscripting.ExecuteError'&amp;gt;: ERROR 000039: Not enough reference data tables for this style.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;I edited like you said and the .shp and .dbf were created correctly, just the create address locator didn't work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:29:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361593#M28548</guid>
      <dc:creator>NathanBaylot1</dc:creator>
      <dc:date>2012-02-06T17:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361594#M28549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would guess you need more than just the primary table referenced for your locator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check out the error&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/000039_Not_enough_reference_data_tables_for_this_style/00vp00000009000039/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/000039_Not_enough_reference_data_tables_for_this_style/00vp00000009000039/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the tool syntax for adding other tables&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002600000004000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002600000004000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specific info on the alternate table&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/The_alternate_name_table/002500000043000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/The_alternate_name_table/002500000043000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361594#M28549</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-02-06T17:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361595#M28550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;well what I did was hardcode the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"AllRoadsParish001 'Primary Table'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;into the address locator script and it worked. But, if I put the&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"AllRoadsParish" + fip + "'Primary Table'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in there it will not&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:50:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361595#M28550</guid>
      <dc:creator>NathanBaylot1</dc:creator>
      <dc:date>2012-02-06T17:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361596#M28551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah that is because you don't have a space in your script, like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;"AllRoadsParish" + fip +" 'Primary Table'"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361596#M28551</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-02-06T17:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Parentheses Rules</title>
      <link>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361597#M28552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See told you those quotes are nasty.... Yeah it worked thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
## Workspace ##
FIPS = "C:\\Users\\D2148\\Documents\\Maps\\FIPS"
 
#FIPSlist = ('001', '003', '005', '007', '009', '011', '013', 
 #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '015', '017', '019', '021', '023', '025', '027',
&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '029', '031', '033', '035', '037', '039', '041',
&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '043', '045', '047', '049', '051', '053', '055',
&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp; '057', '059', '061', '063', '065', '067', '069',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp; '071', '073', '075', '077', '079', '081', '083',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; '085', '087', '089', '091', '093', '095', '097',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # '099', '101', '103', '105', '107', '109', '111',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #'113', '115', '117', '119', '121', '123', '125',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #'127')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
FIPSlist = ('001', '003')

###### CLEAR SELECTION FIRST ########
for fip in FIPSlist:
&amp;nbsp; 
&amp;nbsp; ## SQL for "Master_TAHI" ##&amp;nbsp; 
&amp;nbsp; query = "FIPS_PARIS ='" + fip + "'"
&amp;nbsp; 
&amp;nbsp; ## SQL for "All_roads_cityjoin" ##
&amp;nbsp; query2 = "Parish_FIP ='" + fip + "'"
&amp;nbsp; 
&amp;nbsp; ## Create FIPS###.dbf from Master_TAHI ##
&amp;nbsp; arcpy.TableSelect_analysis("Master_TAHI", FIPS + "&lt;A href="https://community.esri.com/" rel="nofollow noopener noreferrer" target="_blank"&gt;\\FIPS&lt;/A&gt;" + fip + ".dbf",query)
&amp;nbsp; 
&amp;nbsp; ## Create AllRoadsParish###.shp from All_roads_cityjoin ##
&amp;nbsp; arcpy.Select_analysis("All_roads_cityjoin",FIPS + "&lt;A href="https://community.esri.com/" rel="nofollow noopener noreferrer" target="_blank"&gt;\\AllRoadsParish&lt;/A&gt;" + fip + ".shp",query2)
&amp;nbsp; 
&amp;nbsp; ## Create Address Locator ##
&amp;nbsp; Output_Address_Locator = "C:\\Users\\D2148\\Documents\\Maps\\FIPS\\add" + fip
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; arcpy.CreateAddressLocator_geocoding("US Address - Street Name", "AllRoadsParish" + fip + " 'Primary Table'", "'Feature ID' OBJECTID VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' &amp;lt;None&amp;gt; VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' Street_Cat VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Right City or Place' &amp;lt;None&amp;gt; VISIBLE NONE;'Left ZIP Code' ZIPL VISIBLE NONE;'Right ZIP Code' ZIPR VISIBLE NONE;'Left State' STATE VISIBLE NONE;'Right State' STATE VISIBLE NONE;'Left Additional Field' Parish_FIP VISIBLE NONE;'Right Additional Field' Parish_FIP VISIBLE NONE", Output_Address_Locator, "")
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Final Code&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/parentheses-rules/m-p/361597#M28552</guid>
      <dc:creator>NathanBaylot1</dc:creator>
      <dc:date>2021-12-11T16:52:11Z</dc:date>
    </item>
  </channel>
</rss>

