Error 000046 Too many reference tables....

347
1
07-22-2019 09:23 AM
JoeBorgione
MVP Emeritus

ArcGIS 10.6.1

I am trying to (re) create a python script that creates our locators as a scheduled task.  I'm running into a problem when creating a US Address - Single House; I get the above error.

I've tried several different approaches (os.path.join(), .format()) that toss the same error. I opened the help page and followed the example there where it sets the workspace env a priori and that errors out as well:

'''On line help snippet'''


arcpy.env.workspace = "C:/ArcTutor/Geocoding/atlanta.gdb"
Atlanta_AddressLocator_OutputPath = "C:/ArcTutor/Geocoding/Atlanta"

arcpy.CreateAddressLocator_geocoding("US Address - Dual Ranges", "streets 'Primary Table'",......‍‍‍‍‍‍‍‍‍‍‍
''' My snippet'''

locatorStyle = '"US Address - Single House"'
outLocator = '{}\ParcelAddress'.format(locatorsDIR)

parcelAddressSDE = r'I:\GIS\ArcSDE\SuperUser\is\slco@slcopub.sde'
arcpy.env.workspace = parcelAddressSDE

fieldMap = """  
'Point Address ID' OBJECTID VISIBLE NONE;
'Street ID' <None> VISIBLE NONE;
'*House Number' HouseNum VISIBLE NONE;
blah,blah,blah....
"""

arcpy.CreateAddressLocator_geocoding(locatorStyle, "ParcelsAggregate 'Primary Table'",fieldMap,outLocator,"","ENABLED")‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Line 42:  ParcelsAggregate is a feature class within the given Egdb workspace....

Does using python and this style of address locator have some bad blood?

That should just about do it....
0 Kudos
1 Reply
JoeBorgione
MVP Emeritus

I changed a couple things in my python code, and now it works:

In line 3 of my snippet, I now use only single quotes:

'''was : "'US Address - Single House'"

#now:

outLocator = 'US Address - Single House'

Also, in line 16, I dropped the reference to 'Primary Table':

parcelAddressSDE = r'I:\GIS\ArcSDE\SuperUser\is\slco@slcopub.sde'
parcelAddressFC = r'{}\slcopub.SLCO.ParcelsAggregate'.format(parcelAddressSDE)
primaryTable = parcelAddressFC



arcpy.CreateAddressLocator_geocoding(locatorStyle,"{}".format(primaryTable),
                           fieldMap,outLocator,'',enableSuggestions)

Note line 7 where I don't add the extra text 'Primary Table'

That should just about do it....
0 Kudos