Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 500 error for graph.svg #25

Closed
AnthonyWC opened this issue Feb 26, 2018 · 4 comments
Closed

Getting 500 error for graph.svg #25

AnthonyWC opened this issue Feb 26, 2018 · 4 comments
Assignees
Labels

Comments

@AnthonyWC
Copy link

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 using blast-radius --serve . and blast-radius --serve /full_path/foo/bar
image

@28mm
Copy link
Owner

28mm commented Feb 26, 2018

@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

@28mm 28mm self-assigned this Feb 26, 2018
@28mm 28mm added the bug label Feb 26, 2018
@AnthonyWC
Copy link
Author

Cool that works.

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

@Timboo89
Copy link

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
Copy link

PMinhBui commented Sep 29, 2023

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)')`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants