Fixed Import Error type in base.py (#10209)

I have revamped the code to ensure uniform error handling for
ImportError. Instead of the previous reliance on ValueError, I have
adopted the conventional practice of raising ImportError and providing
informative error messages. This change enhances code clarity and
clearly signifies that any problems are associated with module imports.
pull/10560/head
Aashish Saini 1 year ago committed by GitHub
parent a43abf24e4
commit 201b61d5b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1220,7 +1220,7 @@ class Redis(VectorStore):
)
except ImportError:
raise ValueError(
raise ImportError(
"Could not import redis python package. "
"Please install it with `pip install redis`."
)

Loading…
Cancel
Save