Snorby/snorby — Issue #187: error in generating PDF
Author: zrimax
Created: 2012-03-09 09:28:45+00:00
State: open

im getting following error when click export to pdf from dashboard

NoMethodError in Page#dashboard

Showing /home/snorby/app/views/page/dashboard.pdf.erb where line #248 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<=>
Extracted source (around line #248):

245:	Name
246:	Event Count
247:

248:	<% @sensor_metrics.sort{|a,b| -1*(a[1]<=>b[1]) }.each do |hash| %>
249:

250:	<%= hash[:name] %>
251:	<%= hash[:data].sum %>
Rails.root: /home/snorby

Application Trace | Framework Trace | Full Trace
app/views/page/dashboard.pdf.erb:248:in `_app_views_page_dashboard_pdf_erb___471807293__619159718'
app/views/page/dashboard.pdf.erb:248:in `sort'
app/views/page/dashboard.pdf.erb:248:in `_app_views_page_dashboard_pdf_erb___471807293__619159718'
app/controllers/page_controller.rb:47:in `dashboard'
app/controllers/page_controller.rb:43:in `dashboard'
Request

Parameters:

{"format"=>"pdf"}
Show session dump

Show env dump

Response

Headers:

None