Hi Eben and
to the forum,
I must first point out that you do not have a Magic Pie 5 as the motor shown in your video and photos is a Smart Pie.
If you have incorrectly ordered a Magic Pie controller as a replacement, you will need to reflash it using the USB programming cable.
The flash update tool and Smart Pie firmware can be download from
here.
Check out
Gary's video on how to use the perform the Flash Update.
The same controller is used for Magic Pie 5, Magic Pie Edge and Smart Pie 5 but the firmware is different for each motor, so make sure you select the "SMP5-20150702.0C8" file for your Smart Pie motor.
If you did order the correct Smart Pie controller, then the problem is likely to be an incorrect phase wire or Hall sensor sequence.
I can clearly see the "B" next to the Blue wire's terminal, so I presume there is also a "Y" and "G" marked next to the Yellow and Green wires terminals respectively.
Check that these two wires are on the correct terminals.
The bare wire that has been chaffing against the cover on the opposite side will need to be safely insulated and the entire group of wires needs to be kept away from the cover by using a zip tie around the stator spokes, assuming there is enough clearance to fit it underneath them without rubbing against the bearing/cover assembly.
If there is not enough room for the zip tie, you will have to try and rearrange and bend the wires so that that they remain low down and close to the stator and well away from the side cover.
Fortunately, the wire with the worn through insulation appears to be the black ground wire for the Hall sensors, which should not have caused a problem even if it had grounded out through the motor casing.
It might also be worth making sure that the hall sensor block connector has been fully inserted into the controller's socket.
Alan