markitdown
markitdown copied to clipboard
Use fully qualified markitdown imports
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'