Select to view content in your preferred language

Launching model with Python

5585
10
Jump to solution
05-07-2015 10:50 AM
AnthonyBarron
New Contributor III

Hello,

I'm new to using arcpy and I'm running into a few complications in getting a batch job within a model to launch automatically using a python script. I've created the model, tested it, and it works perfectly. However, when I try to launch the model from python, it does not work. I've tried two methods. I've attached relevant documents.

1) Model_ExecuteModelV5.py contains the script used to import the toolbox, and run the model. (the model has no parameters). I've tested the script and I get the printed "Complete". However when I look at my results, the model did not run properly. In this case it did not identify any QC errors which the batch file in the model should have identified. Again, when I test the model within ArcGIS Desktop or Catalog, it works.

2) Model_ExecuteModelV7.py contains the script with the exported model. I exported the model to a .py file and tested that within python. As a result I received an error saying:

AttributeError: 'module' object has no attribute 'ExecuteReviewerBatchJob_Reviewer'

Any support would be greatly appreciated.

0 Kudos
10 Replies
lelaharrington
New Contributor III

Traceback (most recent call last):

  File "F:\GIS\Python_Scripts\GLE_BIS_Silverlight_Overwrite\Archive\Delete_Temp_Holding.py", line 23, in

    arcpy.DeleteTempHolding_GLE_BIS()

  File "F:\GIS\Python_Scripts\GLE_BIS_Silverlight_Overwrite\GLE_BIS.tbx", line 34, in DeleteTempHolding

    

Thank you

Lela Harrington

0 Kudos