Runtime error [Value for attribute `label` can't be null].
Opened this issue · 5 comments
Hi there,
am getting following error:
Value for attribute label
can't be null
/Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz.rb:950:in escape': undefined method
match' for nil:NilClass (NoMethodError)
from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz/node.rb:139:in output' from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz.rb:629:in
block in append_attributes_and_types'
from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz/elements.rb:19:in block in each' from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz/elements.rb:18:in
each'
from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz/elements.rb:18:in each' from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz.rb:613:in
append_attributes_and_types'
from /Users/user/.rvm/gems/ruby-2.1.2/gems/ruby-graphviz-1.0.9/lib/graphviz.rb:432:in output' from lib/visualize_aws.rb:35:in
render'
from lib/visualize_aws.rb:15:in unleash' from lib/visualize_aws.rb:51:in
❯ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
Tried with 56bf817 version.
Hi @kwinczek
It seems like it is not able to identify a node correctly. I've pushed a small change for logging the nodes and edges detected.
Can you run the application with DEBUG=true bundle exec ruby ...
If that doesn't work, would you mind sharing the generated json file with me?
aws ec2 describe-security-groups
You can send it to me at whynospam-awsviz@yahoo.co.in . I am able to run the application with the security groups configured by me and so I'm unsure why this is failing.
@ferrants , thanks for fixing this. I'll merge the pull request shortly.
I'm assuming that the debug logging help validate this issue? I'm unsure why AWS would provide a blank name for any node. I hope that there isn't a missing scenario that the tool should support :)
I did a:
$ DEBUG=true bundle exec ruby lib/visualize_aws.rb -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -f viz.svg | grep node | sort -u
and in the output saw a:
node:
Not sure why it would be blank, I didn't dig in too much, just found that it worked for me.