nheick

Toolbox Not Listed after Running Tools

Discussion created by nheick on Jul 2, 2012
Good Morning,

I have a toolbox for performing a large ETL process consisting of script tools, models, and spatial ETL tools.  If I run the tools individually, I do not have any problem, but when I try to run them from a main script tool, I get various errors, usually attribute errors, on the second or later tools.  Sometimes it works when calling the smaller models, but this pattern is fairly consistent on large models.  I can call one model in the script tool and then the next one will fail.  Usually, it fails inside the model on the first script tool called inside the model.  The general pattern of the ETL is that the main script tool calls script tools and models, the models running the ETL for each feature dataset in the database.

After doing debugging, I found that the toolbox is no longer listed when calling arcpy.ListToolboxes() after the first model has run.  I import the toolbox at the start of the script.  Does anybody have any idea why this would happen?  The last round of ETL runs I was having luck by removing and readding the toolbox at the beginning of the script, but that isn't working now.  I also sense that there may be an issue due to moving the ETL from development to test.

The main problem, though, is that if I comment out the first model call, the second model call will succeed, but the third will fail.

Can anybody explain the arcpy.ImportToolbox function better and why the toolbox wouldn't be listed?

Thanks,


Nathan

Outcomes