Open ebsd opened 4 years ago
Same issue for me
find . -name '*.md' -exec sh -c 'pandoc -s -f markdown -t pdf -F pandoc-mermaid -o $0.pdf $0' {} \;
Created directory mermaid-images
Traceback (most recent call last):
File "/usr/local/bin/pandoc-mermaid", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/pandoc_mermaid_filter.py", line 38, in main
toJSONFilter(mermaid)
File "/usr/local/lib/python3.9/site-packages/pandocfilters.py", line 130, in toJSONFilter
toJSONFilters([action])
File "/usr/local/lib/python3.9/site-packages/pandocfilters.py", line 164, in toJSONFilters
sys.stdout.write(applyJSONFilters(actions, source, format))
File "/usr/local/lib/python3.9/site-packages/pandocfilters.py", line 195, in applyJSONFilters
altered = walk(altered, action, format, meta)
File "/usr/local/lib/python3.9/site-packages/pandocfilters.py", line 123, in walk
return {k: walk(v, action, format, meta) for k, v in x.items()}
File "/usr/local/lib/python3.9/site-packages/pandocfilters.py", line 123, in <dictcomp>
return {k: walk(v, action, format, meta) for k, v in x.items()}
File "/usr/local/lib/python3.9/site-packages/pandocfilters.py", line 110, in walk
res = action(item['t'],
File "/usr/local/lib/python3.9/site-packages/pandoc_mermaid_filter.py", line 31, in mermaid
subprocess.check_call([MERMAID_BIN, "-i", src, "-o", dest])
File "/usr/local/lib/python3.9/subprocess.py", line 368, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/local/lib/python3.9/subprocess.py", line 349, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.9/subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.9/subprocess.py", line 1819, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mermaid'
Error running filter pandoc-mermaid:
Filter returned error status 1
ditto. macOS 10.11
any updates ?
Changing this line
mermaid
in the following line to mmcd
worked for me
MERMAID_BIN = os.path.expanduser(os.environ.get('MERMAID_BIN', 'mermaid'))
Hi !
I installed mermaid-cli:
npm install mermaid.cli
I set the variableMERMAID_BIN='~/node_modules/.bin/mmdc'
I installed pandoc-mermaid-filter :pip install pandoc-mermaid-filter --user
When I run pandoc, I get :
FileNotFoundError: [Errno 2] No such file or directory: 'mermaid'
Can you help me ?