Updated exception to be python3 friendly.