improve how exceptions go to python slightly