Giter Club home page Giter Club logo

Comments (11)

LukeCarrier avatar LukeCarrier commented on June 1, 2024 1

@tpchris1 could you give this build a shot? If it works I'll do an 0.7 release. You'll need to unzip this and install the Python wheel inside:

mkdocs-drawio-exporter-issue-18.zip

You should need to do something like the following, inside of your venv if you're using one:

pip uninstall mkdocs-drawio-exporter
pip install mkdocs_drawio_exporter-0.6.1-py3-none-any.whl

from mkdocs-drawio-exporter.

LukeCarrier avatar LukeCarrier commented on June 1, 2024

@tpchris1 I see you're using Anaconda -- can I ask how you installed it, and which version? I'll try to reproduce this as I'm not quite sure from the above.

from mkdocs-drawio-exporter.

tpchris1 avatar tpchris1 commented on June 1, 2024

OS: Win10

Environment: using VS code with anaconda prompt in the terminal of VS code

Anaconda version: 4.7.12

python package version:
mkdocs 1.1.2
mkdocs-drawio-exporter 0.6.1
mkdocs-material 5.5.13
mkdocs-material-extensions 1.0.1
mkdocs-mermaid2-plugin 0.4.2

I hope nothing is missed here ; )
Thank you!

from mkdocs-drawio-exporter.

LukeCarrier avatar LukeCarrier commented on June 1, 2024

Hey @tpchris1, I tried this out locally and I was able to export diagrams without the drawio_executable option set, as the plugin correctly determined the location:

> mkdocs build -v
[snip]
DEBUG   -  Trying paths ['C:\\Program Files\\draw.io\\draw.io.exe', 'ProgramFiles(x86)\\draw.io\\draw.io.exe'] for platform "win32"
DEBUG   -  Found Draw.io executable for platform "win32" at "C:\Program Files\draw.io\draw.io.exe"
DEBUG   -  Using Draw.io executable "C:\Program Files\draw.io\draw.io.exe", cache directory "\\Mac\Home\Code\avado\sre\docs-anaconda\docs\drawio-exporter" and image regular expression "(<img[^>]+src=")([^">]+)("\s*\/?>)
[snip]

Can you try again without that option set, and if it doesn't work please paste the log of mkdocs build -v?

from mkdocs-drawio-exporter.

tpchris1 avatar tpchris1 commented on June 1, 2024

According to the Debug info, I am assuming that only installed in the default file path as in "C:\Program Files\draw.io\draw.io.exe" is required. However, I installed it in my custom path and it seemed that the package cannot read my passed arguments as following.

plugins:
    - search
    - mermaid2
    - drawio-exporter:
        drawio_executable: 'D:\Program_Files\draw.io\draw.io.exe'

However, I did manage to solve it by installing it in the default path 'C:\\Program Files\\draw.io\\draw.io.exe' and remove the drawio_executable argument.

Is it possible for you to recreate at the drawio_executable part? Or maybe I was doing the wrong way to pass the argument?

Debug info:

DEBUG   -  Config value: 'plugins' = PluginCollection([('search', <mkdocs.contrib.search.SearchPlugin object at 0x000002086BF44438>), ('drawio-exporter', <mkdocsdrawioexporter.plugin.DrawIoExporterPlugin object at 0x000002086F594CC0>)])
DEBUG   -  Trying paths ['C:\\Program Files\\draw.io\\draw.io.exe', 'ProgramFiles(x86)\\draw.io\\draw.io.exe'] for platform "win32"
ERROR   -  Unable to find Draw.io executable; ensure it's on PATH or set drawio_executable option 
DEBUG   -  Using Draw.io executable "None", arguments [], cache directory "D:\tpchris1\programming\ATE\sync\Focus_Docs\docs\drawio-exporter" and image regular expression "(<img[^>]+src=")([^">]+)("\s*\/?>)"

from mkdocs-drawio-exporter.

LukeCarrier avatar LukeCarrier commented on June 1, 2024

Could you confirm the location you'd installed Draw.io to for me, was it D:\Program_Files\draw.io\draw.io.exe?

If so, it might be that Python is treating the backslashes in the path as escape sequences -- try using double backslashes? D:\\Program_Files\\draw.io\\draw.io.exe may work.

from mkdocs-drawio-exporter.

tpchris1 avatar tpchris1 commented on June 1, 2024

Yeah, I can confirm. I tried the double back slashes and also the single/double quotation marks. Besides, I also put the install path in the SYSTEM_PATH of Windows 10 However, none of the above worked in my previous trys.

from mkdocs-drawio-exporter.

LukeCarrier avatar LukeCarrier commented on June 1, 2024

Wow, looks like there's a corker of a bug there. I think we check that the specified executable is executable and then don't actually use it. I'll fix this and push a release either today (it's nearly 9pm here!) or tomorrow; thanks for your patience @tpchris1.

from mkdocs-drawio-exporter.

tpchris1 avatar tpchris1 commented on June 1, 2024

Sure! Glad to help a bit. Really like your work here!
But I am afraid I won't be able to give it a test until next Monday.
I will test it by then and tell you the result! Thank you!

from mkdocs-drawio-exporter.

tpchris1 avatar tpchris1 commented on June 1, 2024

I have tried the issue 18 version and confirmed that it works !
Thanks for the quick fix !

The following are the current log of mkdocs build -V

DEBUG   -  Config value: 'plugins' = PluginCollection([('search', <mkdocs.contrib.search.SearchPlugin object at 0x0000017010674C18>), ('drawio-exporter', <mkdocsdrawioexporter.plugin.DrawIoExporterPlugin object at 0x0000017013CC11D0>), ('mermaid2', <mermaid2.plugin.MarkdownMermaidPlugin object at 0x00000170145064A8>)])
DEBUG   -  Using Draw.io executable "D:\Program_Files\draw.io\draw.io.exe", arguments [], cache directory "D:\tpchris1\programming\ATE\sync\Focus_Docs\docs\drawio-exporter" and image regular expression "(<img[^>]+src=")([^">]+)("\s*\/?>)"

from mkdocs-drawio-exporter.

LukeCarrier avatar LukeCarrier commented on June 1, 2024

Neat, cheers @tpchris1. Release 0.7.0 will be out momentarily, so you should be good to go once you're upgraded 👍

from mkdocs-drawio-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.