Errors

MarkItDown ImportError and AttributeError

Updated 2026-11-16·Upstream source ↗
Markdown view

If Python says it cannot import MarkItDown from markitdown, the usual cause is not a broken install: a file of your own is named markitdown.py, so Python imports that instead of the library. We reproduced it on three Python versions.

Short answer

Run python -c "import markitdown; print(markitdown.__file__)". If the path is in your own project folder, rename that file and delete its __pycache__ folder.

Tested with markitdown 0.1.9 · Python 3.10, 3.12 and 3.13 · markitdown 0.1.9 · Linux lab (T08) · 2026-11-16 · evidence: errors.json, errors-index.csv

ImportError: cannot import name 'MarkItDown'

Reproduced by us

ImportError: cannot import name 'MarkItDown' from partially initialized module 'markitdown' (most likely due to a circular import)

Your own file is called markitdown.py (or sits in a folder called markitdown), so Python imports it instead of the library. The wording depends on the Python version: 3.10 to 3.12 say 'partially initialized module', 3.13 and later suggest renaming the file.

Fix

  • Rename the file (and delete its __pycache__ folder), then run again.
  • Check where Python found the module: python -c "import markitdown; print(markitdown.__file__)"

Affected: any · last reproduced 2026-11-15 · Upstream report

The wording depends on the Python version: 3.10 to 3.12 say "partially initialized module", and 3.13 and later suggest renaming the file. The same happens with a folder called markitdown next to your script.

AttributeError: 'Magika' object has no attribute 'identify_stream'

Reported, not reproduced by us

AttributeError: 'Magika' object has no attribute 'identify_stream'. Did you mean: 'identify_bytes'?

An old magika from another package manager is being imported by a newer markitdown.

Fix

  • Install markitdown into a clean venv with pip so magika matches the version markitdown asks for.

Affected: mixed old magika · Upstream report

This one is reported upstream, and we could not reproduce it: we forced an old magika (0.5.1) into a 0.1.9 environment and conversion still worked. The cause given upstream is a mismatched magika from another package manager, and a clean virtual environment is the suggested fix, but we have not verified it.

command not found is a different problem

If the shell cannot find the markitdown command at all, see the command-not-found page. If a file type needs an extra, see missing dependency.