pinetr2e / napkin

Python as DSL for writing PlantUML sequence diagrams
MIT License
195 stars 10 forks source link

Creating PNG does not work #3

Closed LarsMichelsen closed 4 years ago

LarsMichelsen commented 4 years ago

Using Python 3.7, napkin 0.5.3.2 and

> napkin -f plantuml_png test-docs 
Load file : test-docs
Traceback (most recent call last):
  File "/home/lm/git/check_mk/.venv/bin/napkin", line 8, in <module>
    sys.exit(main())
  File "/home/lm/git/check_mk/virtual-envs/3.7/.venv/lib/python3.7/site-packages/napkin/cli.py", line 59, in main
    generate(args.output_format, args.output_dir)
  File "/home/lm/git/check_mk/virtual-envs/3.7/.venv/lib/python3.7/site-packages/napkin/__init__.py", line 56, in generate
    generated_files = gen_module.generate(d.name, output_dir, context)
  File "/home/lm/git/check_mk/virtual-envs/3.7/.venv/lib/python3.7/site-packages/napkin/gen_plantuml_png.py", line 19, in generate
    if plantuml.PlantUML().processes_file(puml_path, png_path):
TypeError: __init__() missing 1 required positional argument: 'url'

Changing that line to this works:

if plantuml.PlantUML("http://www.plantuml.com/plantuml/img/").processes_file(puml_path, png_path)

The docs should point out that the conversion can only be done with access to that service. Was a bit surprising.

pinetr2e commented 4 years ago

Thanks for raising the issue. I found that there was breaking change in plantuml package since the last release of napkin.

Current napkin version, v0.5.4.9 fixed the issue.

LarsMichelsen commented 4 years ago

Works. Thanks