Revert "custom excepiton s in python"

This reverts commit c92c0d9995e05ea7b0511c08ae90042ab4aada86.