pub fn to_pyvalue_err(e: impl Display) -> PyErr
Converts any type that implements Display to a Python ValueError.
Display
ValueError
Returns a Python error with the error string.