28mm / blast-radius

Interactive visualizations of Terraform dependency graphs using d3.js
https://28mm.github.io/blast-radius-docs/
MIT License
2.04k stars 257 forks source link

Getting 500 error for graph.svg #25

Closed AnthonyWC closed 6 years ago

AnthonyWC commented 6 years ago

No graph/icon is displayed on either Chrome or Firefox; run in directory that has 'terraform init --reconfigure'; I generated a graph.svg in the same directory

ProductName:    Mac OS X
ProductVersion: 10.12.6
BuildVersion:   16G1212

Google Chrome 64.0.3282.186
blast-radius --serve                                                                                                       
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [26/Feb/2018 10:55:05] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [26/Feb/2018 10:55:07] "GET /graph.svg HTTP/1.1" 500 -
127.0.0.1 - - [26/Feb/2018 10:56:26] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [26/Feb/2018 10:56:28] "GET /graph.svg HTTP/1.1" 500 -
127.0.0.1 - - [26/Feb/2018 10:57:28] "GET /static/js/bootstrap.min.js.map HTTP/1.1" 404 -
127.0.0.1 - - [26/Feb/2018 10:57:28] "GET /static/css/bootstrap.min.css.map HTTP/1.1" 404 -

Also tried usingblast-radius --serve . and blast-radius --serve /full_path/foo/bar image

28mm commented 6 years ago

@AnthonyWC thanks for reporting!

Does terraform graph work like you’d expect?

Also, does terraform graph | blast-radius —svg spit out an svg or errors?

Thanks

AnthonyWC commented 6 years ago

Cool that works.

I did terraform graph | blast-radius --svg > graph.svg

Timboo89 commented 3 years ago

For me it's the same, though terraform graph | blast-radius --svg > graph.svg does not work either:

$ terraform graph | blast-radius --svg
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 455, in _module
    return m.groupdict()['module']
AttributeError: 'NoneType' object has no attribute 'groupdict'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/blast-radius", line 96, in <module>
    main()
  File "/usr/local/bin/blast-radius", line 54, in main
    dot = DotGraph('', file_contents=sys.stdin.read())
  File "/usr/local/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 56, in __init__
    self.nodes.append(DotNode(e.target))
  File "/usr/local/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 415, in __init__
    self.module         = DotNode._module(self.label) # for module groupings. 'root' or 'module.foo.module.bar'
  File "/usr/local/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 457, in _module
    raise Exception("None: ", label)
Exception: ('None: ', '[root] module.security_groups (close)')
PMinhBui commented 11 months ago

I have the exact same issue as @Timboo89 terraform graph | blast-radius --svg > graph.svg

`$ terraform graph | blast-radius --svg > graph.svg

Traceback (most recent call last): File "/opt/homebrew/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 455, in _module return m.groupdict()['module'] AttributeError: 'NoneType' object has no attribute 'groupdict'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/homebrew/bin/blast-radius", line 96, in main() File "/opt/homebrew/bin/blast-radius", line 54, in main dot = DotGraph('', file_contents=sys.stdin.read()) File "/opt/homebrew/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 56, in init self.nodes.append(DotNode(e.target)) File "/opt/homebrew/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 415, in init self.module = DotNode._module(self.label) # for module groupings. 'root' or 'module.foo.module.bar' File "/opt/homebrew/lib/python3.9/site-packages/blastradius/handlers/dot.py", line 457, in _module raise Exception("None: ", label) Exception: ('None: ', '[root] module.internal_ingress_controller (close)')`