Synopsis ======== The graph subcommand is unable to access files in the share directory. $ dnsviz graph -Thtml -O -r example.json /usr/local/lib/python3.7/site-packages/pygraphviz/agraph.py:1367: RuntimeWarning: Warning: No such file or directory while opening share/dnsviz/icons/error.png Error: No or improper image file="share/dnsviz/icons/error.png" in label of edge RRset-10|example.com|NS -> DNSKEY-3|example.com|8|58821 Warning: No such file or directory while opening share/dnsviz/icons/error.png Error: No or improper image file="share/dnsviz/icons/error.png" in label of edge RRset-11|example.com|A -> DNSKEY-3|example.com|8|58821 Warning: No such file or directory while opening share/dnsviz/icons/error.png Error: No or improper image file="share/dnsviz/icons/error.png" in label of edge RRset-13|example.com|MX -> DNSKEY-3|example.com|8|58821 Warning: No such file or directory while opening share/dnsviz/icons/error.png Error: No or improper image file="share/dnsviz/icons/error.png" in label of edge RRset-14|example.com|AAAA -> DNSKEY-3|example.com|8|58821 Warning: No such file or directory while opening share/dnsviz/icons/error.png Error: No or improper image file="share/dnsviz/icons/error.png" in label of edge NSEC-2|fbl5gzdn98.example.com|A -> DNSKEY-3|example.com|8|58821 warnings.warn(b"".join(errors).decode(self.encoding), RuntimeWarning) Error reading template file "share/dnsviz/html/dnssec-template.html": No such file or directory Analysis ======== /usr/local/lib/python3.7/site-packages/dnsviz/config.py sets _prefix = '' instead of _prefix = '/usr/local' During the package building process, it appears that install_data is only populated with the real prefix during the stage target, by which point a copy of config.py has already been generated with the empty prefix.
I tried with with dnsviz-0.9.4 and: cd dns/dnsviz/work-py38/dnsviz-0.9.4/tests/data dnsviz graph -Thtml -O -r example-authoritative.json and it creates an example.com.html and an example.net.html, but the browser does not display anything if viewing this. So I have problems reproducing this with a newer dnsviz. Any hints ?
(In reply to Kurt Jaeger from comment #1) Were you able to reproduce with 0.9.2? What is the value of `_prefix` in config.py when it runs to completion without warnings or errors? % curl -O http://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/dnsviz-0.9.2.pkg % tar -xJf dnsviz-0.9.2.pkg --strip-components 7 \ /usr/local/lib/python3.9/site-packages/dnsviz/config.py % grep ^_prefix config.py _prefix = '' I would be glad to re-test with 0.9.4, if you would like to supply a patch against the latest ports tree.
(In reply to John W. O'Brien from comment #2) I tried it with both '' or '/usr/local'. no change. There's no example.json in 0.9.4, and I did not find a an example.json in the 0.9.2 source ?
(In reply to Kurt Jaeger from comment #3) The example.json was the output of dnsviz probe -o example.json example.com Three years ago I was unable to run graph on anything. Now? I'm not able to reproduce the problem anymore on 0.9.2 with python 3.10 nor 3.7. Oh, well. Thanks for looking into it.
When I do the same steps you described, I get an approx. 90 KB large example.com.html file, but if I look at it in the browser, nothing is displayed. What should be displayed ?
Created attachment 239090 [details] DNSViz probe output Output of: dnsviz probe -o example.json example.com
Created attachment 239091 [details] DNSViz graph output Output of: dnsviz graph -Thtml -O -r example.json
Created attachment 239092 [details] DNSViz graph display