markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

Problem with mapped network files

Open samspade opened this issue 1 year ago • 0 comments

I have a python script that watches a folder and when someone drops a Word or HTML document into it, it converts it to markdown and then converts the document format DocX <=> HTML.

The code runs fine when I use it on a local folder but I get the following error when I use it on a mapped network drive [Filepath] would be the file path of the document dropped into the folder.

markitdown._markitdown.FileConversionException: Could not convert '[File path]. While converting the file, the following error was encountered:

Traceback (most recent call last): File "C:\Dev\Mammoth\Lib\site-packages\markitdown_markitdown.py", line 1239, in _convert res = converter.convert(local_path, **_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Dev\Mammoth\Lib\site-packages\markitdown_markitdown.py", line 506, in convert with open(local_path, "rb") as docx_file:

PermissionError: [Errno 13] Permission denied: '[File path]'

So far I have checked:

  • Folder permissions
  • Path is pointing to a file

When I run MarkItDown in the command line, it works fine.

samspade avatar Jan 15 '25 09:01 samspade