Why does gp service change path of scratch data resource?

المشرف العام

Administrator
طاقم الإدارة
I'm extremely confused. I have a python script that works fine locally. When I publish it as a geoprocessing service, it publishes fine, but execution of the service fails. The tool creates an ascii file in the scratch workspace, then tries to convert the ascii file to a .tif with the following code:

#convert ascii file to new grid arcpy.AddMessage("Scratch WS: " + scratchWS) for file in os.listdir(scratchWS): if file.endswith("_vel.asc"): path2ASCII = scratchWS + "/" + file arcpy.AddMessage("ASCII File: " + path2ASCII) arcpy.ASCIIToRaster_conversion(in_ascii_file=path2ASCII, out_raster=outFolder + "/wind_speed_" + sTimeStamp + ".tif", data_type="FLOAT") The scratch workspace is defined by:

scratchWS = arcpy.env.scratchFolder Here are the "arcpy.AddMessage" returns, and the error:



My question is, how does "path2ASCII" change from

c:\data\arcgisserver\directories\arcgisjobs\wcwave_dev\rungriddingtoolsjd_gpserver\j2cc88707c0b24784b1bb8965872ddfbd\scratch/RC_DEM_10m_JD_point_01-01-2014_1200_10m_vel.asc

to

C:\DATA\RC_DEM_10M_JD_POINT_01-01-2014_1200_10M_VEL.ASC?

I've checked both locations and the ASCII file exists in the JobID\scratch folder, but not in the c:\DATA folder, hence the failed execution.



أكثر...
 
أعلى