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.
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