jgcox

Create Map Cache - error 000683

Discussion created by jgcox on Mar 14, 2011
Latest reply on Mar 17, 2011 by jgcox
Howdy,
I'm having trouble using the basic script for creating a map cache. When I run the code below, I get the following:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000683: Could not create a server context.
Failed to execute (CreateMapServerCache).

I'm pretty sure I'm talking the server successfully, because when I change the server_name variable it gives me a different complaint about not being able to connect to the server. I've confirmed that I have an existing map service named "Tex2test" and its data frame is named "Layers." Could someone tell me what invalid parameter it is complaining about?

Many Thanks,
jonathan


My Code:

import arcpy

curroverqritesetting=arcpy.env.overwriteOutput
arcpy.env.overwriteOutput="True"
InServer="localhost"
InMap="Tex2test"
InDataFrame="Layers"
OutFolder="C:\\arcgisserver\\arcgiscache\\"
TilingSchemeType="NEW"
ScalesType="STANDARD"
NumScales="3"
MapOrLayers="FUSED"

arcpy.CreateMapServerCache_server(server_name=InServer,object_name=InMap, data_frame=InDataFrame, out_folder=OutFolder, tiling_scheme_type=TilingSchemeType, scales_type=ScalesType, num_of_scales=NumScales, map_or_layers=MapOrLayers)

arcpy.env.overwriteOutput=curroverqritesetting

Outcomes