If you are really lucky it could turn out to be the wiring between the connector and the stator windings, or one of the winding wires touching the housing somewhere accessible. The windings should be protected against abrasion with the laminations by means of tough insulation pieces lining the slots. Or that's generally the plan.

Fingers crossed.