modelmat / sphinxcontrib-drawio

Sphinx extension for including draw.io files.
MIT License
39 stars 17 forks source link

Fails with DrawIO Error: [WinError 5] Access is denied - because of whitespace in path #84

Open daniel3097 opened 1 year ago

daniel3097 commented 1 year ago

using ".. drawio-figure:: test.drawio" directive results in the following error (windows, whitespace in pathname)

DrawIO Error: draw.io ("C:\Users\AB1234\OneDrive - ABC\repo\needs\docs\utils\draw.io-21.1.2-windows-no-installer.exe" --export --crop --page-index 0 --scale 1.0 --format png --output C :\Users\AB1234\OneDrive - ABC\repo\needs\docs\build\html.doctrees\drawio\f7cee1ec9581edc5b575d34416e8fd53113b8808\test.png C:\Users\AB1234\OneDrive - ABC\repo \needs\docs\source\snmp\test.drawio --enable-logging) exited with error: [WinError 5] Access is denied

To Reproduce whitespace in sphinx project name path

Setup Information

Additional context when i add quotes to export and input path in init.py in drawio_args like this .... line 261

str(export_abspath),

        # str(input_abspath),
        f'"{str(export_abspath)}"',
        f'"{str(input_abspath)}"',

then it is working fine