-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Description
Checked other resources
- I added a very descriptive title to this issue.
- I searched the LangChain documentation with the integrated search.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
from langchain.retrievers.multi_query import MultiQueryRetriever
Error Message and Stack Trace (if applicable)
Traceback (most recent call last):
File "", line 1, in
File "/home/ubuntu/miniconda3/envs/nettalk/lib/python3.12/site-packages/langchain/retrievers/init.py", line 33, in
from langchain.retrievers.self_query.base import SelfQueryRetriever
File "/home/ubuntu/miniconda3/envs/nettalk/lib/python3.12/site-packages/langchain/retrievers/self_query/base.py", line 5, in
from langchain_community.vectorstores import (
File "/home/ubuntu/miniconda3/envs/nettalk/lib/python3.12/site-packages/langchain_community/vectorstores/init.py", line 115, in getattr
module = importlib.import_module(_module_lookup[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniconda3/envs/nettalk/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniconda3/envs/nettalk/lib/python3.12/site-packages/langchain_community/vectorstores/pgvector.py", line 23, in
from sqlalchemy import SQLColumnExpression, delete, func
ImportError: cannot import name 'SQLColumnExpression' from 'sqlalchemy' (/home/ubuntu/miniconda3/envs/nettalk/lib/python3.12/site-packages/sqlalchemy/init.py)
Description
My app uses sqlalchemy v1 due to my db dialect not supporting v2. The above change breaks MultiQueryRetriever in 0.1.13.
System Info
System Information
OS: Linux
OS Version: #17~22.04.1-Ubuntu SMP Fri Nov 17 21:07:13 UTC 2023
Python Version: 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0]
Package Information
langchain_core: 0.1.33
langchain: 0.1.13
langchain_community: 0.0.29
langsmith: 0.1.31
langchain_experimental: 0.0.55
langchain_openai: 0.1.1
langchain_text_splitters: 0.0.1
langgraph: 0.0.25
Packages not installed (Not Necessarily a Problem)
The following packages were not found:
langserve