aws-samples / aws-samples/aws-agentic-document-assistant
Dependency Error: Unable to Import Module 'handle'
- Dominant language
- Jupyter Notebook
- Stars
- 98
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
**Issue Description**
Hello, this is my first attempt at contributing to open source. While following the provided instructions, I encountered a dependency error that requires an update to the requirements.txt file. The error message indicates that the _module 'handle'_ cannot be imported. Additionally, it appears that the `langchain-community` package is needed to utilize `langchain.llms` which is inside the _handler.py_.
**Error Details**
```
{
"errorMessage": "Unable to import module 'handle'",
"errorType": "Runtime.ImportModuleError",
"requestId": "3684b295-164d-499a-b947-515c5b3e6e7e",
"stackTrace": []
}
```
**Steps to Reproduce**
- Follow the provided setup instructions in the repository.
- Attempt to run the application.
- Observe the error in the response from the AI chatbot indicating the missing 'handle' module.
**Proposed Solution**
To resolve this issue, I propose updating the requirements.txt file to include the necessary dependencies. Specifically, adding the langchain-community package to ensure compatibility with langchain.llms inside the directory: `backend/lib/lambda-functions/agent-executor-lambda-container/requirements.txt`.
**Updated requirements.txt**
```
# Sepcify boto3 and botocore versions with Amazon Bedrock access.
boto3>=1.28.57
botocore>=1.31.57
langchain
duckduckgo-search
psycopg2-binary
pgvector
# Add the following dependencies
langchain-community
```
**Additional Notes**
Ensure that the requirements.txt file is updated and all relevant dependencies are included.
Verify that the application runs successfully after updating the dependencies.
**Error Screenshot**

Thank you for your attention to this issue. Please let me know if further details are required.
Contributor guide
Assessment
This issue has not been assessed yet.