It seems that the script can't find a template.md.jinja file, causing a runtime error. This is on a macOS machine with Python installed via homebrew.
$ python3 --version
Python 3.10.6
$ pip3 install mdbom
[...]
$ mdb generate --input doc/bom/bom.json --output doc/bom/mdb.md --type npm
Traceback (most recent call last):
File "/opt/homebrew/bin/mdb", line 8, in <module>
sys.exit(cli())
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/mdbom/mdbom.py", line 85, in generate
generate_markdown(
File "/opt/homebrew/lib/python3.10/site-packages/mdbom/md/md.py", line 27, in generate_markdown
with open(template, "r") as template_file:
FileNotFoundError: [Errno 2] No such file or directory: 'template.md.jinja'
Hi @preston,
sorry, I missed this one. As stated in the docs you need either define a template via --template or the default is used which expects a file called template.md.jinja to be present in the current directory. You can find an example template file in the here.
It seems that the script can't find a
template.md.jinja
file, causing a runtime error. This is on a macOS machine with Python installed via homebrew.