Select to view content in your preferred language

Published GP service is not using data store

2225
1
Jump to solution
10-07-2015 01:47 AM
JonMorris2
Frequent Contributor

I published a GP tool to my server and it fails when I try and run it via Javascript API. The error is that it cannot find the input dataset - this is happening because the input workspace is a file GDB on a network share and the server does not have access to any network resources.

We've set up the data store (see screenshot) so that the network file GDB is duplicated locally, and I thought that the GP service would use the local workspace instead, but this clearly isn't happening.

DataStore.png

I remote desktopped onto the server and found the location of the python script and saw that the workspace had been converted to a global variable, but was still pointing to the network GDB. Should this have been changed to the local GDB?

# Esri start of added variables
g_ESRI_variable_1 = u'\\\\getech\\store\\UTILITIES\\Globe_Data\\2015_08_04\\globe20150804-134955.gdb'
# Esri end of added variables


...


INWorkspace = g_ESRI_variable_1
OUTWorkspace = arcpy.env.scratchGDB
arcpy.env.workspace = INWorkspace
arcpy.env.scratchWorkspace = OUTWorkspace


etc

When I edit the script and change

g_ESRI_variable_1 = u'\\\\getech\\store\\UTILITIES\\Globe_Data\\2015_08_04\\globe20150804-134955.gdb'

to

g_ESRI_variable_1 = r'd:\data'

it runs ok when called with Javascript.

cc GeoprocessingArcGIS API for JavaScript

0 Kudos
1 Solution

Accepted Solutions
JonMorris2
Frequent Contributor

This is a known issue with server 10.2.1 - NIM098733. It's fixed at 10.3 and I don't think there are any plans to backport to 10.2, so I'll have to upgrade, or keep editing the script after publishing.

View solution in original post

0 Kudos
1 Reply
JonMorris2
Frequent Contributor

This is a known issue with server 10.2.1 - NIM098733. It's fixed at 10.3 and I don't think there are any plans to backport to 10.2, so I'll have to upgrade, or keep editing the script after publishing.

0 Kudos