Replies: 1 comment
-
🤖 Hello, The error you're encountering, "ModuleNotFoundError: No module named 'langchain.documents'", is likely due to an incorrect import statement. Based on the context provided, it seems that there is no 'documents' module in the 'langchain' package. However, the 'langchain' package does have a 'document' module in its 'docstore' sub-package. If you're trying to import the 'Document' class, you should do it as follows: from langchain.docstore.document import Document If you're trying to import a specific class for loading documents, you should import it from 'langchain.document_loaders'. For example, if you want to import the 'TextLoader' class, you should do it as follows: from langchain.document_loaders import TextLoader Please ensure that you're using the latest version of LangChain (v0.0.277) and that your import statements are correct. If you're still encountering issues, please provide more details about your setup and the exact code you're trying to run. Best regards, Sources
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. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am also getting the following error during a streamlit deployment.
My other langchain import is fine except for the document.
from langchain.documents import Document
ModuleNotFoundError: No module named 'langchain.documents'
Beta Was this translation helpful? Give feedback.
All reactions