langchain
langchain copied to clipboard
Latest langchain_community is giving an error "No MODULE PWD" while using TEXTLOADER
Checked other resources
- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
Example Code
na
Error Message and Stack Trace (if applicable)
No response
Description
The latest version of langchain_coomunity 0.0.20 is giving an error "NO MODEUL PWD" while using TEXTLOADER()
System Info
Running on windows and using TEXTLOADER
🤖
I understand that you're encountering a "NO MODULE PWD" error while using the TEXTLOADER in the latest version of langchain_community (0.0.20) on a Windows system. This issue seems to be related to the pwd
module, which is not available on Windows.
A similar issue was reported in the LangChain repository, specifically in the issue #17514. The problem was addressed in the pull request #17532 and the corresponding commits 7ae3ce60 and c76a7ff3. The solution involved moving the import pwd
statement to a try-catch block to handle the ModuleNotFoundError.
However, it seems that the issue persists in the versions langchain==0.1.7 and langchain-community==0.0.20. As a workaround, you could downgrade to the following versions where the issue is not present:
- langchain==0.1.6
- langchain-community==0.0.19
- langchain-core==0.1.23
You can do this by running the following command in your terminal:
pip install langchain==0.1.6 langchain-community==0.0.19 langchain-core==0.1.23
Please note that this is a temporary solution, and the LangChain team is likely working on a fix for the newer versions. Keep an eye on the repository for updates. If you have any further issues, feel free to ask.
Sources
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Same happens with GenericLoader...