python error message for non-unique tool name

3672
2
02-18-2010 12:41 PM
curtvprice
MVP Esteemed Contributor
ArcGIS 9.3.1:

>>> print gp.usage("clip")
>>> Method clip not found. Choices: Method clip not unique, please use ToolboxName_ToolName.


ArcGIS 9.4b2:

>>> print arcpy.Usage("Clip_management")
Clip_management(in_raster, rectangle, out_raster, {in_template_dataset}, {nodata_value}, {NONE | ClippingGeometry})
clips a raster
>>> print arcpy.Usage("Clip")
Method Clip not found. Choices: Method Clip not unique, please use ToolboxName_ToolName.


Were you going to list the available toolboxes with a clip tool?

If not you probably want to delete the string "Choices: " to avoid confusion. it would be nice to see the list when debugging python code if it can be done.
Tags (2)
0 Kudos
2 Replies
RebeccaStrauch__GISP
MVP Emeritus
Any help with syntax/usage string in the Python window would be helpful.  The 2nd window is helpful, but a simple usage with the print command sticks around after you move off the line....the 2nd window will clear.
0 Kudos
curtvprice
MVP Esteemed Contributor
*** Do not write below this line ***

ESRI Incident #796389 (Barbara S) - Contact - Python diagnostic message is incomplete/wrong when tool name is ambiguous

Hello, Curtis,

My name is Barbara and I will be assisting you with this incident report. I have duplicated this on 9.3.x, 10B2, and on a weekly build for version 10. I have filed a defect report (#NIM054814) for this behavior:
[#NIM054814  Error diagnostics for the Usage geoprocessing command offers a Choices list with no choices.]

Thank you for bringing this to our attention.

Best regards,

Barbara S.
0 Kudos