mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-14 00:47:27 +00:00
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:
parent
a43abf24e4
commit
201b61d5b3
@ -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…
Reference in New Issue
Block a user