1

I have a Desktop Script tool that works fine when run on desktop, but does not work when the results are turned into a geoprocessing serice. Running ArcGIS 10.2 on Desktop and 10.2 on server.

I have found that the geoprocessing service fails at the line of code where it tries to to load a data file I have saved to file. I have tried saving the data files using pickle, json, and also array files as .npy and .npz. It doesn't seem to make any difference. The geoprocessing service just will not load any array type file I provide. I have tried letting the geoprocessing packager save the file to the server, I have saved the files to a registered folder, and it doesn't seem to matter. Even text files will not load.

Has anyone been successful at loading a numpy array, dictionary, or similar type file into a geoprocessing service on arcgis server? If so, how did you do it?

I added error handling to my script, and here are the messages when I run the Geoprocessing Service:

Traceback Info:  
File "E:\ARCGIS~2\DIRECT~1\ARCGIS~4\ARCGIS~2\Grace\HT5C33~1.GPS\EXTRAC~1\v101\HTAT_S~1\140307_HTAT_debug.py, line 74, in [module] 
npzfile = numpy.load(array_package)  

Error Info:  
[Erno 2] No such file or directory: u'C:\\Users\\arcgis\\AppData\\Local\\Temp\\..\\cd\\tooldata\\package131123.npz

The E: drive is on the gis server machine and the .npz file is my data file I am trying to load. 140307_HTAT_debug.py is my source script. Apparently the npz file was copied over to the server, but not sure what that path means with the double dots, and why the server can't read it.

  • Is your Geoprocessing Service seeing the path names to these files identically to how the Python script tool finds them? – PolyGeo Mar 8 '14 at 8:54
  • 1
    When ArcGIS creates a geoprocessing service, it uses the results from a successful tool run. It finds all associated data used to run the tool and copies it over to the arcgis server, if the data is not already present on the server. So no, the paths would be different. ArcServer doesn't really provide much in terms of error messages. I do not know how I could see the path name that arcgis server sees. – woodfoot Mar 8 '14 at 16:49
  • In my experience, AGS does not find and copy the associated data -- I believe you must provide the data as input parameters or code the application to find the resources it needs. AGS provides the same error messages available from Desktop if you enable them in the service (by using the Parameters page to set the Message Level from the "None" default to "Info"). Then you could add diagnostic output to name each resource before it's used to debug your code. – Vince Mar 8 '14 at 20:38
  • @Vince Thanks, I changed the parameter setting to info and added error handling. The results are shown in the edited original post. – woodfoot Mar 9 '14 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.