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

undefined method `[]' for nil:NilClass (NoMethodError) #3

Open
hpcprofessional opened this issue Jul 24, 2016 · 3 comments
Open

undefined method `[]' for nil:NilClass (NoMethodError) #3

hpcprofessional opened this issue Jul 24, 2016 · 3 comments

Comments

@hpcprofessional
Copy link

Working with some non-public data that was created by the catalog_preview module, I'm getting this error. I can provide the non-public data to a Puppet person or, if necessary, I can spend awhile sanitizing the data for public consumption. Let me know.

# /somewhere/prosvc-preview_report/preview_report.rb -f /somewhere/catalog_preview.json -w /somewhere/catalog_preview.html

/etc/puppetlabs/puppet/modules/prosvc-preview_report/preview_report.rb:520:in `block (2 levels) in <main>': undefined method `[]' for nil:NilClass (NoMethodError)
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder.rb:162:in `instance_eval'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder.rb:162:in `capture'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder.rb:207:in `tag!'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder_tags.rb:23:in `html_tag'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder_tags.rb:9:in `body'
    from /etc/puppetlabs/puppet/modules/prosvc-preview_report/preview_report.rb:442:in `block in <main>'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder.rb:162:in `instance_eval'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder.rb:162:in `capture'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder.rb:207:in `tag!'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder_tags.rb:23:in `html_tag'
    from /opt/puppet/lib/ruby/gems/1.9.1/gems/markaby-0.8.0/lib/markaby/builder_tags.rb:9:in `html'
    from /etc/puppetlabs/puppet/modules/prosvc-preview_report/preview_report.rb:73:in `<main>'
@acidprime
Copy link
Contributor

@hpcprofessional should be resolved with a8724cb, let me know and I will cut a bug release tag

@hpcprofessional
Copy link
Author

Yes. The fix works for the test case. Thanks!

@vchepkov
Copy link
Contributor

This problem is back after upgrade to PE2017.3.4

/opt/preview_report/preview_report.rb:561:in `block (2 levels) in <main>': undefined method `[]' for nil:NilClass (NoMethodError)
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder.rb:142:in `instance_eval'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder.rb:142:in `capture'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder.rb:193:in `tag!'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder_tags.rb:23:in `html_tag'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder_tags.rb:5:in `body'
	from /opt/preview_report/preview_report.rb:436:in `block in <main>'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder.rb:142:in `instance_eval'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder.rb:142:in `capture'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder.rb:193:in `tag!'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder_tags.rb:23:in `html_tag'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/markaby-0.9.0/lib/markaby/builder_tags.rb:5:in `html'
	from /opt/preview_report/preview_report.rb:74:in `<main>'

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

No branches or pull requests

3 participants