I have a python script that calls a model I built in model builder. If I run the model by itself it runs perfectly. If I call the model in the python script, the model errors in various locations. Python is definitely calling the model and running some portions of it.
for GDBThatOverLaps in GDBWithDataOnInstallation: addMessage("Appending data from " + GDBThatOverLaps) inputWaterArea = GDBThatOverLaps + "\\" + WA inputWaterbody = GDBThatOverLaps + "\\" + WB arcpy.AddToolbox(r"E:\Scripts_Calculations_and_Tools\RTAM_Tools_Models.tbx") arcpy.appendNHD2_rtamModels(installationBoundary, ie, inputWaterArea, targetWaterArea) arcpy.appendNHD2_rtamModels(installationBoundary, ie, inputWaterbody, targetWaterbody)
The model is called appendNHD2 and it is found in rtamModels toolbox which is properly imported using the add toolbox method of the arcpy module.
I have checked that all of my variables are proper paths and reference valid data.
Has anyone encountered, and overcome calling a model in python and it erroring?