Problem with mapped network files
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.