Skip to content

Use fully qualified markitdown imports #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
deepdive101 opened this issue Jan 31, 2025 · 0 comments
Open

Use fully qualified markitdown imports #311

deepdive101 opened this issue Jan 31, 2025 · 0 comments

Comments

@deepdive101
Copy link

deepdive101 commented Jan 31, 2025

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'
@deepdive101 deepdive101 changed the title Use explicit markitdown imports Use fully qualified markitdown imports Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant