Shouldn't this exception propagate all the way up to the python layer? I think this try catch statement isn't necessary and goes against the "fail early" principle.