STY: Change exceptions to be py3 compatible