AnsweredAssumed Answered

Error 001270: Consolidating the data failed. Failed to execute (StageService)

Question asked by patblair on Jun 5, 2015
Latest reply on Nov 10, 2016 by GWaltersesriaustralia-com-au-esridist

Hello.  I have an arcpy script that can draft, stage, and upload a service on Machine A, but which fails during staging on Machine B when I get to the point where I call arcpy.server.StageService(). Here is the error:


arcgisscripting.ExecuteError: ERROR 001270: Consolidating the data filed.

Failed to execute(StageService).


Machine A is running ArcGIS 10.2 while Machine B is running 10.2.2.


I have created the simplest possible map document that I know how to create and modified it to the point that Machine A can publish it without errors, messages, or warnings.  Neither Machine A nor Machine B report any errors during the analysis of the draft, though Machine B seems to report a warning that Machine A does not: "Layer is using unsupported label settings (KML) (CODE 20032)".  Having said that, I should mention that I don't have any unusual labeling effects (of which I'm aware), and according to this document, you can simply "Do nothing" when you see it because "the effects not supported by KML will be ignored by the KML service".


From Machine A, I can draft, stage, and upload the map to the ArcGIS Server instance on Machine B, but I get the exception noted above when I attempt to run the same script, against the same data, on Machine B.  On both machines, the data is stored in the same directory (ie. all the file paths are the same).


I have done much research (reviewing ESRI docs, older posts, etc.) trying to figure out what might be causing this behavior and what I must correct to make it work.  For example, I have followed the advice in this document, but to no avail.  So far, though, I am still unable to get around this error.


I have attached my test script to this post, and also pasted it below.  I believe that the test script I am running is just about the least-exotic possible example of publishing a map service using arcpy, and I am at a loss to determine why Machine B is unhappy.


Any advice you may be able to provide would be greatly appreciated.


Many thanks.


(Script Follows)

import arcpy

import arcpy.mapping

import arcpy.server

import os, ntpath, sys




# See which python version we're running.

print sys.executable # C:\Python27\ArcGISx6410.2\python.exe



mxd = "C:\\MapData\\Main.mxd"

working_dir = "C:\\Temp"

connection_file_name = "my_ags.ags"

connection_file_path = ntpath.join(working_dir, connection_file_name)

draft_file_path = "C:\\Temp\\my_draft.sddraft"

service_def_file_path = draft_file_path[:-5]

server_url = "http://MYSERVER:6080/arcgis/admin"

service_name = "Main"

folder = "MyFolder"




# Remove the files created by previous runs.

for f in [ connection_file_path, draft_file_path, service_def_file_path ]:

    if ntpath.isfile(f):





print("Creating the connection file.")

# Create the connection file.






                                            use_arcgis_desktop_staging_folder=False, # Don't use an ArcGIS desktop staging folder.








# Create the draft.

print("Creating the draft.")

analysis = arcpy.mapping.CreateMapSDDraft(mxd,












# Perform the analysis.

print("Here comes the analysis...")

for key in ('messages', 'warnings', 'errors'):

  print "----" + key.upper() + "---"

  vars = analysis[key]

  for ((message, code), layerlist) in vars.iteritems():

    print "    ", message, " (CODE %i)" % code

# I've redacted the affected layers from the output just to make it a little

# easier to read, but here's the code...

#    print "       applies to:",

#    for layer in layerlist:

#        print,

#    print






# Stage the draft.

print("Staging the draft.") # Machine B fails at the next line...





# Upload the service.

print("Uploading the service.")