Issue with traded pokemon

I have an Onix a friend traded with me. I tried to deposit it in my PC, but I get this error when I try to deposit it or hover over it at all while in my PC. When I try to view its stats, I get this error message. Both force me to close the game out afterwards. I have no idea how to remove this unwanted Onix from my party at this point.

It’s corrupted. Put it in the Day care in Metchi Town.

Thanks a lot man, I probably wouldn’t have thought about doing that. I appreciate the help.