arcpy doesn't see a tool that I have loaded

07-11-2019 09:33 AM
by Anonymous User
Not applicable

I have made a custom tool that I want to use in another custom tool. I have loaded the toolbox that it is in using arcpy.ImportToolbox. 

I keep getting the following error:

The error occurs at "arcpy.AddPivotField_tsa_tools"...

This tool really does exist. I listed the tools from this toolbox within the script and it correctly listed this tool, including the alias "_tsa_tools" It seems to have access to this tool.

Most obvious explanation is that I am entering it wrong, but I'm not. I've tried many many times.

I have a feeling this is a facepalm. I'm overlooking something obvious. Is there something that needs to be done to "tell" arcpy that this tool exists?

Thank you for any assistance you may be able to provide.

0 Kudos
4 Replies
Occasional Contributor II

Hi Randy,

Try removing the underscores from the toolbox alias.

Let me know if this helps! 

0 Kudos
by Anonymous User
Not applicable

Thanks! I will try that.

0 Kudos
by Esri Contributor
Esri Contributor

Hello Randy,

A custom tool typically has a name and a label --

The Name property is the language-independent name of the toolbox and is used as a language-independent reference to a tool within a toolbox in scripting.
The Label property is language dependent, so if you give your toolbox to someone who uses a different language (or just doesn't like the label), he or she can change just the label without breaking any script references to the toolbox.

Could you check the properties of your custom tool to confirm if "AddPivotField_tsa_tools" is the name or the label? We would need to call the tool by its name in ArcPy.

Let me know how it goes

by Anonymous User
Not applicable


I am using the model name, not the label. The problem, may be the underbars in the alias. I'll try that.

Thank you for your input.


0 Kudos