Just trying to take a .csv with two addresses in it, and write a script that uses the geocode.GeocodeAddresses tool to do so. I have most of my code developed, as you can see below, based on the documentation located here
below I've attached screenshots of both my code and my errors
because I am unclear about where I'm going wrong with my 'locator' string that's preventing the tool from running
Hi @AlexanderZirilli, Just sending a heads-up that I moved this post from our Member Introductions Board (intended for newcomers to introduce themselves—thank you for your other introduction post!) to this Board for ArcGIS Pro Questions that's more relevant to your topic where it's more likely to be seen and responded to by members who can help. All the best!
Two things I would recommend:
1. Avoid having spaces in file names and directories
2. use a csv (comma separated values) file rather than xlsx (Excel)
You could also use another tool to convert the xslx file to a supported table type and use that in the GeocodeAddresses tool.
@AlexanderZirilli I second what @TonyContreras_Frisco_TX has to say about the spaces in the file name, but also make sure there are no spaces or special characters in the field names as well. If you are going to use an excel file you need the path to the file and the sheetname, for example "...\GE_PCB_sites.xlsx\Sheet1$".
Also, if you are working with locators on your portal (ArcGIS Online or Enterprise), ensure that you are signed in and have it set as your active portal in ArcGIS Pro. To access a locator that is on a portal other than your active portal or using a script outside of ArcGIS Pro, you can authenticate using the SignInToPortal function.
Errors explained:
- 000840 is related to the missing sheet name in the path to the excel file.
- 000732 & 000005 are related to not being signed into ArcGIS Online to access the ArcGIS World Geocoding Service and the service being considered invalid for batch geocoding.