-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LangChain - ImportError : cannot import name Executable from sqlalchemy #32
Comments
This problem can be reproduced with the single import line:
e.g. Works with SQLAlchemy 2.0.27
Fails with SQLAlchemy 1.4.51
|
Key pieces of the SQLAlchemy support for LangChain are implemented in sql_database.py The langchain current version (0.0.20) has this requirement (per link1, link2):
So, this version ( |
This is a bug in langchain which causes an incompatibility with SQLAlchemy 1.x. Langchain PR 17191 introduced the problem when merged to the master branch on Feb 7, 2024. Langchain issue 17519 was opened on Feb 14, 2024 with a number of people encountering the same problem. The fix was merged to master via 17520 In the meantime, the workaround is to downgrade langchain from UPDATE/CORRECTION: The workaround is to downgrade both the
|
nice work! |
I've tried to l install langchain of
|
@hab6 Is the other workaround to pull headrevs of langchain that includes the fix? @vayvay0993 you may need to check in with the langchain product, it doesn't seem like the issue relates to this project based on the traceback and @hab6 research. |
@vayvay0993 @clach04 My prior update on the workaround was incorrect. The workaround in fact requires that the In summary, to resolve error:
The workaround is to use these package versions:
|
@vayvay0993 The import works for me with these package versions.
Could you please retest and see if this works for you? |
Yes, I really appreciate your help! 🙏 |
This issue is now fixed with Langchain version
SQLAlchemy |
The following langchain test case succeeds when run with SQLAlchemy
2.0.27
but fails when run with SQLAlchemy1.4.51
.Test Case
Test Environment Versions
Stack Dump & Error
The text was updated successfully, but these errors were encountered: