microsoft / microsoft/markitdown
Use fully qualified markitdown imports
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
I installed markitdown directly from GitHub using the command uv add git+https://github.com/microsoft/markitdown. I did this because the GitHub version contains unreleased changes that I require.
I ran into two import errors caused by these lines in __main__.py:
from __about__ import __version__
from _markitdown import MarkItDown, DocumentConverterResult
To address these two import errors, I had to change the above two lines in __main__.py to use fully qualified imports:
from markitdown.__about__ import __version__
from markitdown._markitdown import MarkItDown, DocumentConverterResult
I request that __main__.py be updated in this way to prevent the import errors.
For your reference, the tracebacks were:
Traceback (most recent call last):
File "/projects/doc-convert/./.venv/bin/markitdown", line 4, in <module>
from markitdown.__main__ import main
File "/projects/doc-convert/.venv/lib64/python3.11/site-packages/markitdown/__main__.py", line 7, in <module>
from __about__ import __version__
ModuleNotFoundError: No module named '__about__'
Traceback (most recent call last):
File "/projects/doc-convert/./.venv/bin/markitdown", line 4, in <module>
from markitdown.__main__ import main
File "/projects/doc-convert/.venv/lib64/python3.11/site-packages/markitdown/__main__.py", line 8, in <module>
from _markitdown import MarkItDown, DocumentConverterResult
ModuleNotFoundError: No module named '_markitdown'
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
Open main.py and review the two imports that produce ModuleNotFoundError when the package is installed from GitHub. Run the markitdown CLI in that installation to reproduce the failures, then verify it starts without those import errors after the imports are fully qualified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100