microsoft / microsoft/markitdown
AttributeError: module 'pdfminer.high_level' has no attribute 'extract_text'"
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
I am getting the following issue when I was trying to extract the attached
PDF.
FileConversionException: Could not convert 'Interstallar.pdf' to Markdown. File type was recognized as ['.pdf', '.pdf', '.fdf']. While converting the file, the following error was encountered:
Traceback (most recent call last):
File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/markitdown/_markitdown.py", line 1239, in _convert
res = converter.convert(local_path, **_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/markitdown/_markitdown.py", line 490, in convert
text_content=pdfminer.high_level.extract_text(local_path),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pdfminer.high_level' has no attribute 'extract_text'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the attached Interstallar.pdf, then inspect _markitdown.py around line 490 where pdfminer.high_level.extract_text is called. Check the installed pdfminer API and the resulting traceback. Done means the PDF converts to Markdown without this AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 40/100