I have a python script that runs 5 Spatial ETL tools that I wish to run as a scheduled task.
Each of the tools will run successfully from ArcCatalog and also from the ArcCatalog Command line.
If I try to run the tools from the DOS window, as would be done via python script for a scheduled task, arcpy cannot find the tools, although it does load the toolbox.
In the attached screenshot:
- I open a cmd.exe window
- start python
- import arcpy
- Import my toolbox, which is verified as loaded on the next line
- Use arcpy.ListTools to see what tools are loaded. the result is "[]", meaning no tools are recognized from this tool box
- I use the same ListTools to show the Spatial Analyst tools that were loaded by import arcpy
- I attempt to execute one of the tools from my toolbox and forget a " (my mistake!)
- I attempt to execute one of the tools from my toolbox and receive the message "AttributeError: 'module' object has no attribute 'CopyFeatureClass_newgpetl'".
What is preventing my tools from being recognized from the DOS CMD.EXE window while ArcCatalog and ArcCatalog Command Line can run them?