Automating Workforce Assignements Python KeyError location

514
4
Jump to solution
05-23-2022 10:42 AM
JMox
by
New Contributor II

I am on an ArcGIS Pro account
I am trying to create assignments from a feature using the examples from GitHub and keep getting a KeyError 'Location'.  I am a novice with python so any help will be greatly appreciated!!

JasminMoxhamcompass_0-1653327700557.png

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

The location field can be any text value, it doesn't have to be an address. If you have a code or you could use that, or just hard-code it to something in your script.

View solution in original post

0 Kudos
4 Replies
by Anonymous User
Not applicable

@JMox  does your feature layer have a field called "Location" in it? If not that's why you'd see this error. You may need to use another field. The fields are also case sensitive.

0 Kudos
JMox
by
New Contributor II

I have been wrestling with the location.  My points are in the middle of nowhere and don't have an address.  When I do geocode, they all have the same address.

How do I deal with this

0 Kudos
by Anonymous User
Not applicable

The location field can be any text value, it doesn't have to be an address. If you have a code or you could use that, or just hard-code it to something in your script.

0 Kudos
JMox
by
New Contributor II

Thanks!!

0 Kudos