I know this is a topic that has come up multiple times but I have gone through all the previous discussions and my geocoding is still failing. My script is from a modelbuilder I exported as python. I am using a composite geolocator with files that are updated daily. My table is from sql and is updated every 30 minutes.
I am using Arc 10.3.1, Python 2.7
Here is what I have already tried:
I have formatted my addresses to contain the exact address.
I have included overwrite = true.
I have changed SingleKey to Single Line Input and then just removed it completely.
I have changed the double quotes on Static to single quotes.
# Import arcpy module import arcpy
#Overwrite pre-existing files arcpy.env.overwriteOutput = True
# Local variables: ArcDev_dbo_OIDTest_sites_2015i_2016_new = "C:\\Users\\tselvidge\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\arcdev@srvarcdev.sde\\ArcDev.dbo.OIDTest_sites_2015i_2016_new"
- GISOWNER_ParcelAddrFacet_geo__2_ = "C:\\Users\\tselvidge\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\arcdev@srvarcdev.sde\\ArcDEV.GISOWNER.ParcelAddrFacet_geo" ArcDev_GISOWNER_GeoRecs_New = "C:\\Users\\tselvidge\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\arcdev@srvarcdev.sde\\ArcDev.GISOWNER.Sharept_symbolized\\ArcDev.GISOWNER.GeoRecs_New" ArcDev_GISOWNER_GeoRecs_New__3_ = ArcDev_GISOWNER_GeoRecs_New ArcDev_GISOWNER_GeoRecs_New__4_ = ArcDev_GISOWNER_GeoRecs_New__3_
# Process: Geocode Addresses arcpy.GeocodeAddresses_geocoding(ArcDev_dbo_OIDTest_sites_2015i_2016_new, GISOWNER_ParcelAddrFacet_geo__2_, "'Single Line Input' AcctNo VISIBLE NONE;HCAD_NUM AcctNo VISIBLE NONE;Street Street VISIBLE NONE;City City VISIBLE NONE;State <None> VISIBLE NONE;ZIP ZIP VISIBLE NONE;QFNAME FileMapFacet VISIBLE NONE", ArcDev_GISOWNER_GeoRecs_New, 'STATIC')
Solved! Go to Solution.
It certainly is odd. I changed my server connection and now my script runs (with the composite locator containing single and multi) on my local but pointing to data on the virtual server. I cannot get the script to run however on the virtual server. It has a problem with my parameters even though I named all the folders and connections exactly the same as on my local.
Bruce,
Thank you for your help!
It is now working from local and virtual server. I took out the space from "'single line input'" as you advised. When running from my local, I needed to use 'Database Connections' but on the virtual server I needed to use the entire path but without the r's. When I added r's the script became confused. I also had to change another parameter within the geocoding and modify the server connection from my personal login (admin) to gisowner login.
So it took a variety of modifications for each machine but at least it now works.
For now I am keeping the composite locator with the various locators. If it ends up breaking, I will change it. I am waiting since the workaround will be rather clumsy and significantly less efficient than what I currently have setup.