OWASP / pytm

A Pythonic framework for threat modeling
Other
924 stars 176 forks source link

Format: "png" not recognized. #254

Open jasonculligan opened 3 weeks ago

jasonculligan commented 3 weeks ago

When following the second example on the readme an error is thrown:

$ ./tm.py --dfd | dot -Tpng -o tm/dfd.png
Format: "png" not recognized.
$ dot -V
dot - graphviz version 2.50.0 (20211204.2007)
raphaelahrens commented 3 weeks ago

Hi,

the version of dot you are using is quite old and you don't mention what OS your are using, so it is difficult to figured out what is causing this.

In Version 3.0 the Graphivz team fixed some issue with building png image. https://gitlab.com/graphviz/graphviz/-/blob/main/CHANGELOG.md?ref_type=heads#300--2022-02-26 So if you want to have a png you will need to fix the problem of GraphivZ on your system.

You can of course also try to build a JPEG, PostScript, or SVG, with -Tjpeg, -Tps or -Tsvg instead of -Tpng.