BUG: Failed to parse content from a large file (ResolverParsingError)
- Dominant language
- Python
- Stars
- 38.6k
- Forks
- 2.7k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 3
Description
I have tried with a relatively large file (27197 characters) and it failed.
Here's how I called the extract funcion:
```python
result = lx.extract(
text_or_documents=input_text,
prompt_description=prompt,
examples=examples,
model_id="gemini-2.5-flash",
batch_length=20,
extraction_passes=3, # Multiple passes for improved recall
max_workers=20, # Parallel processing for speed
max_char_buffer=1000 # Smaller contexts for better accuracy
)
```
and the result:
```shell
File ".../langextract/__init__.py", line 226, in extract
return annotator.annotate_text(
~~~~~~~~~~~~~~~~~~~~~~~^
text=text_or_documents,
^^^^^^^^^^^^^^^^^^^^^^^
...<5 lines>...
extraction_passes=extraction_passes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File ".../langextract/annotation.py", line 505, in annotate_text
annotations = list(
self.annotate_documents(
...<7 lines>...
)
)
File ".../langextract/annotation.py", line 239, in annotate_documents
yield from self._annotate_documents_sequential_passes(
...<7 lines>...
)
File ".../langextract/annotation.py", line 419, in _annotate_documents_sequential_passes
for annotated_doc in self._annotate_documents_single_pass(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
document_list,
^^^^^^^^^^^^^^
...<4 lines>...
**kwargs, # Only show progress on first pass
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File ".../langextract/annotation.py", line 355, in _annotate_documents_single_pass
annotated_chunk_extractions = resolver.resolve(
top_inference_result, debug=debug, **kwargs
)
File ".../langextract/resolver.py", line 230, in resolve
raise ResolverParsingError("Failed to parse content.") from e
langextract.resolver.ResolverParsingError: Failed to parse content.
```
Contributor guide
Assessment
This issue has not been assessed yet.