Why is a ValueError acceptable here?