This should be a `ValueError`, not an `AssertionError`