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.
This commit is contained in:
Aashish Saini
2023-09-14 00:42:58 +05:30
committed by GitHub
parent a43abf24e4
commit 201b61d5b3

View File

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