Published GeoProcessing Task not working on ArcGIS Server. Is this a Python script issue?

5687
2
05-25-2015 07:57 AM
JustinGleeson
Occasional Contributor

I have a geo-processing model that works perfectly in ArcGIS desktop (10.1) and successfully publishes as a GP Task to ArcGIS Server (10.1). Once I try to execute the GP task (either through a widget on Flex or even as a tool in Toolbox on Server) it fails with the following error message: ‘Problem ESRIJobFailed Failed’.

On further inspection of this through running the tool via Arc Toolbox on Server I get a ‘000816: The tool is not valid’ error.

I’m not sure what the problem is here as the model and subsequent python scripts within it work perfectly on Arc desktop. A simpler version of the model that did not include any python scripts also worked fine and was successfully deployed as working GP tasks on my Flexviewer.

Any ideas on what the issue might be?

I’ll use a simplified version of my model as a working example –

The model asks a user to (1) select a pre-defined study area (Select Study Area), and then (2) allows the user to select from a list of raster layers (1, 2 or 3 – this doesn’t matter) to be included in the analysis. The user can then (3) apply a weight to these layers that are used in a raster calculation process. The model then takes each layer that is selected, apply a weight to it, stores the results until all layers are processed and the uses Cell Stats to bring all of this together. The final output is then clipped to the geography chosen in (1).

This all works fine on Desktop but the model seems to trip up as it works through step (2) – this is where the Python scripts are. The python scripts have been included to allow users to select or de-select the layers rather than simply using them all (this was the previous version and it operated on all layers in the Air and Climactic.gdb).

Model 1 below is my main model and details where the first python script is used. This script ‘Select Factors.py’ enables users to select from the list of layers available. Once these are selected they are then sent through a sub-model (Model Iterate) that runs all of the raster calculations and finally adds the results to Collect Values (The Collect Values shown here actually collects values from ‘Air and Climactic’ as well as a number of other themes that are in the full model). The second python script (LayerNametoPathName) is in this sub-model and it stores the layer and workspace name for use in the Raster Calculation process. The rest of the model just processes the collected results and clips to the study area.

Main Model (model 1)

Model1.jpg

Sub Model

Model2.jpg

As I mentioned, this works in ArcGIS Desktop and it publishes as a GP task without any issues. Unfortunately it just won’t run on Server or on my Flex!

Any suggestions on what the problem could be would be great.

Thanks

Justin

0 Kudos
2 Replies
ToddBlanchette
Occasional Contributor II

Hi Justin,

I'll try the simplest approach here first, since I can't see all your code and what specifically might be wrong line by line.  If you had a previously working tool that no longer works, obviously start with the new code.  That being said, it doesn't sound like you're getting a geoprocessing error.  The "Invalid Tool" code is usually thrown when Arc can't see the location of your tool within a model, or your model within a toolbox.  Can you double check all your references to paths, especially since your path locations may be different when you're looking at things from the server side vs your client side.  This would be my first step - hopefully it's that simple for you.

Cheers,

Todd

0 Kudos
JustinGleeson
Occasional Contributor

Hi Todd,

Thanks. I will work through all the links again to see what the issues are. Will keep you posted.

Thanks

Justin

0 Kudos