As noted here, when you receive an error of the form
001272 : Analyzer errors were encountered (codes = <value>).
this means that the attempt to stage and publish a service failed.
The tool provides a set of codes in the error message, but the documentation I linked to only tells you to fire up an ArcGIS Desktop tool to find out the problem. Instead, I would prefer to use the code to look up what the error is; this would be especially helpful to me since the publish is happening automatically in Python via arcpy.
Is there a resource that tells us what the codes mean?
I am using 10.2 at the moment and will soon be upgrading to 10.3.