1

When I create a Python Toolbox (pyt), I set the name and description of the toolbox. When I create the parameters, I can set their name, type, default value, in/out, etc. Basically, everything that the system needs to know about this toolbox is contained in the Python code and object attributes.

Now I want to publish this pyt as a geoprocessing service. I go through the steps and click Analyze and it says that all of my parameters are missing descriptions and it won't let me publish until they're filled in. If I'm debugging or experimenting, this results in a lot of parameters with a description of 'asdf'.

It seems like there should be somewhere where the Description for the properties could be filling in or specified, but I've yet to find it. Any ideas?

EDIT: Even in Catalog, I can't set the Description on the individual parameters until I go to publish them. I have a few geoprocessing services, each with multiple parameters, all in one toolbox. Having to set the parameter descriptions on each parameter, even if just to a dummy string like 'asdf' is a PITA.

  • But as noted below, those xml files get overwritten when the .pyt signatures change, so that's an awkward solution (although it seems to be the best on there is). I guess I can write a post-build script to edit the XML. – CMPalmer Jun 22 '15 at 2:14
1

Parameter descriptions for a Python toolbox tool are carried in xml files that sit alongside the .pyt file. Can edit them by right-clicking on the tool in say the Catalog window, and selecting Item Description. And then from the Item Description dialog, clicking the Edit button.

  • Yes, I know where they're stored and how to edit them in Catalog, but (and I may find this through some experimentation), aren't these xml files overwritten when I modify the .pyt? While I'm developing the .pyt, I want to be able to easily publish and republish on a test server and the publish fails until descriptions are present. It just seems weird and incomplete that most of the rest of the attributes can be set in code. – CMPalmer Jun 22 '15 at 2:12
  • @CMPalmer. Yes, the xmls will get updated when you make a change. Essentially, it is the same separation as in a script tool. In both cases, the parameter properties and parameter description info are stored differently, and associated by name. So if the name of a parameter changes, the description for that parameter will get lost. – DWynne Jun 26 '15 at 22:46
  • 1
    Wish ESRI would change that - it makes deploying them as GP services a PITA, but your answer is correct. – CMPalmer Jun 29 '15 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.