I am working on PuTTY and trying to create service definition file in server. My Python script is creating .sddraft but I am receiving 'Consolidating the data failed' error when I run stage service script. I already checked the following link and fixed my issues. http://resources.arcgis.com/en/help/main/10.1/index.html#//00vp0000002r001270

import arcpy

wrkspc = '/home/gis/arcgis/server/arcpy/arcpy/idtech/Example/'
mapDoc = arcpy.mapping.MapDocument(wrkspc + 'test.mxd')

service = 'test'
sddraft = wrkspc + service + '.sddraft'
sd = wrkspc + service + '.sd'

analysis = arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft , service, 'MY_HOSTED_SERVICES')
arcpy.StageService_server(sddraft, sd)

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.