Skip to content
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

-o flag doesn't work #292

Open
kristofmulier opened this issue Jan 18, 2025 · 1 comment
Open

-o flag doesn't work #292

kristofmulier opened this issue Jan 18, 2025 · 1 comment

Comments

@kristofmulier
Copy link

My system:

  • Windows 11
  • Python 3.13

I attempted to use markitdown like this at first:

>markitdown user_manual.pdf > user_manual.md

But that leads to a Unicode error:

UnicodeEncodeError: 'charmap' codec can't encode character '\u3001' in position 32198: character maps to <undefined>

The root cause is that Windows is trying to print text with characters (like \u3001) that don’t exist in the default code page cp1252. In other words, Markitdown is generating Unicode output, but printing it directly to the console fails on Windows when the console doesn’t support that character.

To mitigate this problem, I now try this:

>markitdown user_manual.pdf -o user_manual.md

Which results in:

markitdown: error: unrecognized arguments: -o user_manual.md

How can it not recognize the -o flag? The homepage of markitdown shows the -o flag as a valid input flag for the tool.

@kristofmulier
Copy link
Author

My current workaround is:

>chcp 65001
Active code page: 65001

>set PYTHONIOENCODING=utf-8

>markitdown user_manual.pdf > user_manual.md

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