Comments (11)
@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.
@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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- Draw.io is now Diagrams.net HOT 2
- Not possible to run within Docker
- Don't attempt copy of cache file if export was unsuccessful HOT 1
- Consider implementing headless exports to remove Electron dependency HOT 1
- Deprecation warning when converting Draw.io images to svgs HOT 4
- Using an <object> tag in created svg HOT 2
- Does not work github pages HOT 1
- Can't parse filenames with spaces HOT 1
- Errors when using plugin in Github Actions HOT 1
- Github Actions HOT 1
- Error while exporting image
- Drawio source duplicated in build directory
- No Output file
- `warn` => `warning`
- Is it possible to use non standard shape libraries? HOT 2
- Alt-Text from draw.io document text HOT 4
- `SyntaxError: f-string: unmatched '['` with 0.9.0 release HOT 1
- Consider some form of static analysis in CI
- Redesign the caching to be 'static assets' somehow? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-drawio-exporter.