I'm working with the geoprocessing server tool (GenerateOriginDestinationCostMatrix) imported as a toolbox (OriginDestinationCostMatrix) in ArcMap 10.6. Being asynchronous I use the resultID with arcpy.Results() to retrieve the status and, once complete, the results from the server. Some of my results show up as complete (result.status == 4) but when I try to retrieve and save the output_origin_destination_lines (result) from the results to a geodatabase I get the error "RuntimeError: RecordSetObject: No internal record set object for Save". Most of my results save fine this way. Has anyone experienced this? Any suggestions?
Sample Code (path is a local .gdb, resultID gets cleared after 24 hours):
tool = 'GenerateOriginDestinationCostMatrix_OriginDestinationCostMatrix' result = arcpy.Result(tool, resultID) if result.status == 4: outFC = os.path.join(path, resultID) result.save(outFC)
Everything seems like it executed fine and the result hasn't been cleared from the server yet. For example result.getMessages() returns warnings but not errors, and "solve_succeeded" (results) comes back as true. All the other results outputs save successfully using the same method. For example, output_destinations saves fine: