This is one of the question which is very similar to my problem or almost same to my problem
I ran with dummy data nucleotide alignment and the amino file it works perfectly fine,i can run the dn/ds from phangorn without any issue.
But when i ran with my data nucleotide alignment and the amino file I do get this warning
In kaks(carps) : sequence lengths are not a multiple of 3
Any help or suggestion would be highly appreciated.