Geoprocessing Service Runs But Doesn't Produce Output

4470
32
Jump to solution
01-25-2017 11:00 AM
LloydBronn
Occasional Contributor II

So I've created a geoprocessing Python script tool that I've published as a GP service. This script takes lat/lon coordinates, extracts data from a raster from these coordinates, outputs a .csv and creates an Excel chart from a .vbs script. I can run the Python script on our server from the "C:\arcgisserver\directories\arcgissystem\arcgisinput" path and it works. I'm trying to test the GP service (Execute Task (GET))  from a browser on our REST services page. It says it's successful, but it doesn't actually output the chart. It does create the .csv, but it doesn't run the .vbs script. Here is the result message:

{
 "results": [],
 "messages": [
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Executing (ChartTest): ChartTest 45 -122 Portland"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Start Time: Wed Jan 25 13:51:23 2017"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Executing (ChartTest): ChartTest 45 -122 Portland"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Start Time: Wed Jan 25 13:51:23 2017"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Running script ChartTest..."
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Completed script ChartTest..."
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Succeeded at Wed Jan 25 13:51:23 2017 (Elapsed Time: 0.70 seconds)"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Succeeded at Wed Jan 25 13:51:23 2017 (Elapsed Time: 0.71 seconds)"
  }
 ]
}

I had a lot of trouble publishing this GP service because the Python script creates a .vbs, and these types of scripts can't be copied to the server. I got around this by changing the ".vbs" reference to ".txt" and publishing. I changed it back to ".vbs" on the server. I'm not sure if the server is blocking the .vbs or what. There are no errors in the server logs. 

32 Replies
JonathanQuinn
Esri Notable Contributor

I'm glad you were able to get to the bottom of it!

0 Kudos
LloydBronn
Occasional Contributor II

Thank you! We successfully published this matplotlib GP service using all local paths on the server. We're giving up on trying to get Excel to run from a GP service. I don't think it can be done. Matplotlib seems to cut out about a million steps anyway. 

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Lloyd, I removed the assumed....so treat as a question again.  btw, how you do that is to mark one as correct and then unmark it right away.