A parrot that appeared in the Pirates of the Caribbean film, starring Johnny Depp and Keira Knightley, has attacked a police officer after its owner was pulled over for driving with the bird perched on her shoulder. 