ExtractiveReader breaks if run with no documents
Describe the bug ExtractiveReader breaks if run with no documents
Error message File "/home/rootuser/miniconda3/envs/xxxx/lib/python3.10/site-packages/haystack/components/readers/extractive.py", line 630, in run answers = self._nest_answers( File "/home/rootuser/miniconda3/envs/xxxx/lib/python3.10/site-packages/haystack/components/readers/extractive.py", line 391, in _nest_answers current_answers = self.deduplicate_by_overlap(current_answers, overlap_threshold=overlap_threshold) File "/home/rootuser/miniconda3/envs/xxxx/lib/python3.10/site-packages/haystack/components/readers/extractive.py", line 515, in deduplicate_by_overlap deduplicated_answers = [answers[0]]
System:
- OS: Linux
- GPU: A100
- Haystack version: v2.2.2
Hey!
This seems like a duplicate of #7731 (fixed in #7732).
I am not able to reproduce it with the following code (haystack-ai==2.2.2):
from haystack.components.readers import ExtractiveReader
reader = ExtractiveReader()
reader.warm_up()
res=reader.run(query="hello", documents=[])
Can you try updating Haystack? In case you still encounter a the error, please attach a reproducible example.