Tag Info

Hot answers tagged

1

Instead of: for fields in arcpy.Listfields(Feature): print fields try: for field in arcpy.Listfields(Feature): print field.name My changing of fields to field is not important but I think it makes the code read better. However, what is important is that ListFields returns a list of field objects and so you need to examine the name property of each ...


1

The Try/except does work - the problem here is GP Services have defined inputs and outputs. When you publish it and go look at the REST end point of the service, you'll see how these items are defined. Your service expects an output of a certain type. When your service "fails", it doesn't return whats expected of it and you get that error. If you don't want ...



Only top voted, non community-wiki answers of a minimum length are eligible