PaddleX icon indicating copy to clipboard operation
PaddleX copied to clipboard

ModuleNotFoundError: No module named 'langchain.docstore'

Open Yugsolanki opened this issue 1 month ago • 4 comments

Description: I encountered a ModuleNotFoundError while working with the BaseRetriever class in the base.py file. The error message indicates that the module langchain.docstore cannot be found, which is causing issues when trying to import necessary components for vector retrieval.

Steps to Reproduce:

  1. Attempt to run the code in base.py.
  2. Observe the error message: ModuleNotFoundError: No module named 'langchain.docstore'.

Expected Behavior: The code should run without import errors, allowing for the proper functionality of the BaseRetriever class.

Actual Behavior: The code fails to execute due to the missing module, preventing any further operations that depend on this class.

Proposed Solution: Review and update the import statements in base.py to ensure compatibility with the current structure of the langchain library. This may involve checking the latest documentation for langchain and adjusting the imports accordingly.

Additional Information:

  • The issue seems to be related to recent changes in the langchain library structure.
  • Please let me know if further information is needed to assist in resolving this issue.

Yugsolanki avatar Nov 26 '25 14:11 Yugsolanki

Please add the label: bug

Yugsolanki avatar Nov 26 '25 14:11 Yugsolanki

+1 facing the same issue

karanataryn avatar Nov 30 '25 10:11 karanataryn

@changdazhou I have already submitted pull request.

Yugsolanki avatar Dec 06 '25 10:12 Yugsolanki

Thank you for your submission. Please ensure your code is submitted to the develop branch, and after the code is merged, we will synchronize it to the release branch. Additionally, please confirm whether your changes are forward-compatible. Since PaddleX has locked the version of langchain, if your changes support the latest version, further consideration may be needed regarding compatibility with other dependencies.

changdazhou avatar Dec 09 '25 04:12 changdazhou