microsoft / microsoft/markitdown

cannot convert pdf to md

Open
#95 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug question
Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

command:

markitdown demo.pdf

Traceback (most recent call last):
File "/home/user/.local/bin/markitdown", line 5, in
from markitdown.main import main
File "/home/user/.local/lib/python3.11/site-packages/markitdown/init.py", line 5, in
from ._markitdown import MarkItDown, FileConversionException, UnsupportedFormatException
File "/home/user/.local/lib/python3.11/site-packages/markitdown/_markitdown.py", line 23, in
import pptx
File "/home/user/.local/lib/python3.11/site-packages/pptx/init.py", line 9, in
from pptx.api import Presentation
File "/home/user/.local/lib/python3.11/site-packages/pptx/api.py", line 14, in
from pptx.package import Package
File "/home/user/.local/lib/python3.11/site-packages/pptx/package.py", line 11, in
from pptx.parts.image import Image, ImagePart
File "/home/user/.local/lib/python3.11/site-packages/pptx/parts/image.py", line 10, in
from PIL import Image as PIL_Image
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 89, in
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/usr/lib/python3/dist-packages/PIL/init.py)

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

Start by reproducing markitdown demo.pdf and trace the import path through markitdown.__main__, markitdown._markitdown, pptx, and PIL. Inspect the project's dependency declarations and verify the installed packages are compatible; done means PDF conversion starts without the reported _imaging import error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.