Python script works on ArcGIS Desktop, but not on Server

3244
2
03-30-2016 06:24 AM
DilsonKitoko
New Contributor III

Dear all,

I've setup a Geoprocessing service, based on a  python script. I can publish a gp tool by creating the tool, running ArcMap, and then selecting the results and clicking Share As GP Service. The tool execute with success in ArcMap. But after create the GP services and execute in AGS as  Widget it's didn't work. So, I went to REST page to see the INFO. I could see that I'm getting a python error, as below:

  • esriJobMessageTypeError: Traceback (most recent call last): File "D:\arcgezfffisserver\directories\arcgissystem\arcgisinput\teste\GP_Bearing_Distance.GPServer\extracted\v101\gp_tools\Prediction.py", line 103, in del row NameError: name 'row' is not defined

I just have the following parameter at the line 103   " bearing_pos = Bearing + 15"

How it's that possible the scrip locally is working, but the version stored at the Server is not working? I'm using ArcGIS for Server 10.2.2.. The tool works well in version 10, but I'm stucked at the migration

I

Thanks in advance

Dilson

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

since this question is marked as answered, can it be assumed that it was in error or did you find the answer out by yourself.  In any event, you may wish to mark it as unanswered by clicking on the title and going to the thread outside of your mail, or, perhaps provide the solution that worked for you.

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi

When you publish a python base tool the publishing change the script and copy it to the server directory (as you can see in the error).

Line 103 in the changed script might be different then line 103 in the original script.

Take a look in the changed script (but do not edit it) to try to understand the problem.

0 Kudos