aws-samples / aws-samples/aws-lex-conv-faq
[Error] when uploading txt file to source materials bucket
- Dominant language
- Python
- Stars
- 14
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Revieve following error from the read-source-and-build-index Lambda function when I try to upload attached .txt file to the source materials bucket. Able to execute with a pdf instead
[allergies_faq.txt](https://github.com/aws-samples/aws-lex-conv-faq/files/13221499/allergies_faq.txt)
```
[ERROR] TypeError: __init__() takes 1 positional argument but 2 were givenTraceback (most recent call last): File "/var/task/index_creation_app.py", line 63, in handler documents = [Document(t) for t in text_list] File "/var/task/index_creation_app.py", line 63, in documents = [Document(t) for t in text_list] | [ERROR] TypeError: __init__() takes 1 positional argument but 2 were given Traceback (most recent call last): File "/var/task/index_creation_app.py", line 63, in handler documents = [Document(t) for t in text_list] File "/var/task/index_creation_app.py", line 63, in documents = [Document(t) for t in text_list]
-- | --
```
Contributor guide
Research direction
Start in index_creation_app.py at line 63, where text_list is converted into Document objects in the read-source-and-build-index Lambda function. Reproduce the upload with allergies_faq.txt and compare it with the working PDF path. Done means a .txt upload completes without the reported TypeError and builds the index successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100