microsoft / microsoft/markitdown

Use fully qualified markitdown imports

Open
#311 0 comments 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.