bone heat weighting failed to find solution for bones code example
Example: Bone Heat Weighting: failed to find solution for one or more bones
When the object has duplicate vertices. This can be solved by removing doubles in Edit Mode ( keyboard shortcut "W" -> Remove Doubles)