Hi All,
This process was working correctly just recently, only change has been the latest ArcPro update. I'm basically following the examples in this help doc. Sample of bare min code to reproduce below.
My service/task list is pretty complicated so the script is a HUGE time/mistake saver.
I've tried a few tweaks and modified it down to just one tool and always get the same result. I've also tried the script with just a single, simple out-of-the box tool (AddXY) rather than the custom tools/scripts -- example below.
Environment:
Process Results:
Repro script:
result = arcpy.management.AddXY(
in_features=r"D:\temp\data\scratch\Default.gdb\GPXPoints"
) ^
sd = r"D:\temp\data\scratch\xy.sd"
sddraft = r"D:\temp\data\scratch\xy.sddraft"
serverconnectionfile = r"D:\temp\data\scratch\arcgis_on_server.com.ags"
serviceName = "XYTest"
analyzeMessages = arcpy.CreateGPSDDraft(
result, sddraft, serviceName, server_type="FROM_CONNECTION_FILE",
connection_file_path= serverconnectionfile,
copy_data_to_server=True, folder_name=None,
summary="XY Service", tags="gp", executionType="Synchronous",
resultMapServer=False, showMessages="INFO", maximumRecords=5000,
minInstances=2, maxInstances=3, maxUsageTime=100, maxWaitTime=10,
maxIdleTime=180)
analyzeMessages
#{'errors': {}, 'warnings': {}, 'messages': {}}
arcpy.server.StageService(sddraft, sd)
#<Result 'D:\\temp\\data\\scratch\\xy.sd'>
Attached are the output sddraft and sd files
Thanks for any insights.