sphinxcontrib-drawio icon indicating copy to clipboard operation
sphinxcontrib-drawio copied to clipboard

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

Open daniel3097 opened this issue 3 years ago • 0 comments

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

  • OS: Windows
  • Python: 3.10
  • Version: 0.0.16

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

daniel3097 avatar Apr 01 '23 21:04 daniel3097