<?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 Geocoding using tasks.arcgisonline.com locators seems to end in error at random in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/geocoding-using-tasks-arcgisonline-com-locators/m-p/720661#M40856</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Esri folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a python script I have been running batch geocoding through for the last 9 months or so. I pasted the python script at the bottom of this entry for reference. The script has been working fine until recently and I can't figure out what would have changed. I have python 2.6 installed, I have Arcinfo 10.0 with SP5 installed as well. And my work site (Stanford university) has a license for the online services. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The behavior that I am seeing is: when I submit addresses for geocoding I get an error at seemingly random places. I have submit the same set of 40,000+ addresses and had 2,000 returned as well as 10,000. This is with no change in the data and no change in the python script. NOTE: I also experience the same problem if I run the geocoding through the in program geocoder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What should I be looking for to fix this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Python script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Created on Aug 14, 2012&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@author: rmadou&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This script geocodes batches of addresses&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To make this work you must add the geocoding service to ArcCatalog on your local machince. Here are instructions on how to do that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Look in the Catalog Tree for GIS Services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Expand that and select Add ArcGIS Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. In the dialog, choose Use GIS services. Click Next.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. For the Server URL, type: &lt;/SPAN&gt;&lt;A href="http://tasks.arcgisonline.com/arcgis/services"&gt;http://tasks.arcgisonline.com/arcgis/services&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Press ok. You should now see arcgis on tasks.arcgisonline.com in that GIS servers list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6. Expand the connection and expand the locators folder. Select and click on the locator you want to use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7. Copy the full location path from the Location bar at the top of ArcCatalog. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you must also map your data headers to the GeocodeAddresses_geocoding headers &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for more information on the arcpy function/s used here see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/#/Geocode_Addresses/002600000006000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/#/Geocode_Addresses/002600000006000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;'''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy,time, datetime&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#class Geocode():&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; def RunGeoCoding(self):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;startTime = time.time()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "geocoding started at", datetime.datetime.now()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set local variables: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;address_table = r"All on import 2013-3-14 8th set.TXT" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "address table loaded"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;address_locator = r"GIS Servers\arcgis on tasks.arcgisonline.com\Locators\TA_Address_NA_10.GeocodeServer" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "address locator loaded"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geocode_result = r"D:\Documents\Eclipse workspaces\PATS\geocode active 4D addresses\src\output shape files\all_on_import_2013-3-14_8th_set.shp" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "output file created, but not yet populated"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.GeocodeAddresses_geocoding(address_table, address_locator, "Street Address VISIBLE NONE;City CITY VISIBLE NONE;State State VISIBLE NONE;Zip Zip VISIBLE NONE", geocode_result) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;duration=time.time()-startTime&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "done! I took ",duration/60," minutes to run"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Mar 2013 21:33:08 GMT</pubDate>
    <dc:creator>ramsesmadou</dc:creator>
    <dc:date>2013-03-20T21:33:08Z</dc:date>
    <item>
      <title>Geocoding using tasks.arcgisonline.com locators seems to end in error at random</title>
      <link>https://community.esri.com/t5/data-management-questions/geocoding-using-tasks-arcgisonline-com-locators/m-p/720661#M40856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Esri folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a python script I have been running batch geocoding through for the last 9 months or so. I pasted the python script at the bottom of this entry for reference. The script has been working fine until recently and I can't figure out what would have changed. I have python 2.6 installed, I have Arcinfo 10.0 with SP5 installed as well. And my work site (Stanford university) has a license for the online services. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The behavior that I am seeing is: when I submit addresses for geocoding I get an error at seemingly random places. I have submit the same set of 40,000+ addresses and had 2,000 returned as well as 10,000. This is with no change in the data and no change in the python script. NOTE: I also experience the same problem if I run the geocoding through the in program geocoder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What should I be looking for to fix this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Python script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Created on Aug 14, 2012&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@author: rmadou&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This script geocodes batches of addresses&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To make this work you must add the geocoding service to ArcCatalog on your local machince. Here are instructions on how to do that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Look in the Catalog Tree for GIS Services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Expand that and select Add ArcGIS Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. In the dialog, choose Use GIS services. Click Next.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. For the Server URL, type: &lt;/SPAN&gt;&lt;A href="http://tasks.arcgisonline.com/arcgis/services"&gt;http://tasks.arcgisonline.com/arcgis/services&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Press ok. You should now see arcgis on tasks.arcgisonline.com in that GIS servers list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6. Expand the connection and expand the locators folder. Select and click on the locator you want to use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7. Copy the full location path from the Location bar at the top of ArcCatalog. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you must also map your data headers to the GeocodeAddresses_geocoding headers &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for more information on the arcpy function/s used here see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/#/Geocode_Addresses/002600000006000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/#/Geocode_Addresses/002600000006000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;'''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy,time, datetime&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#class Geocode():&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; def RunGeoCoding(self):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;startTime = time.time()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "geocoding started at", datetime.datetime.now()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set local variables: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;address_table = r"All on import 2013-3-14 8th set.TXT" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "address table loaded"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;address_locator = r"GIS Servers\arcgis on tasks.arcgisonline.com\Locators\TA_Address_NA_10.GeocodeServer" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "address locator loaded"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geocode_result = r"D:\Documents\Eclipse workspaces\PATS\geocode active 4D addresses\src\output shape files\all_on_import_2013-3-14_8th_set.shp" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "output file created, but not yet populated"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.GeocodeAddresses_geocoding(address_table, address_locator, "Street Address VISIBLE NONE;City CITY VISIBLE NONE;State State VISIBLE NONE;Zip Zip VISIBLE NONE", geocode_result) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;duration=time.time()-startTime&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "done! I took ",duration/60," minutes to run"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 21:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geocoding-using-tasks-arcgisonline-com-locators/m-p/720661#M40856</guid>
      <dc:creator>ramsesmadou</dc:creator>
      <dc:date>2013-03-20T21:33:08Z</dc:date>
    </item>
  </channel>
</rss>

