Project

General

Profile

Bug #370

new tracebacks with prewikka 1.0.0rc2

Added by Pierre Chifflier over 14 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
02/10/2010
Due date:
% Done:

100%

Resolution:

Description

#369 is solved :) but it seems there are other problems:

On statistics -> Sources

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/prewikka/Core.py", line 335, in process
    getattr(view_object, view["handler"])()
  File "/usr/lib/python2.5/site-packages/prewikka/views/stats.py", line 571, in render
    self._renderSourcesTrend(criteria)
  File "/usr/lib/python2.5/site-packages/prewikka/views/stats.py", line 559, in _renderSourcesTrend
    "alert.source.node.address.address", criteria, 10, zoom_type="sources_trend")
  File "/usr/lib/python2.5/site-packages/prewikka/views/stats.py", line 414, in _addTimelineChart
    timeline.render(title)
  File "/usr/lib/python2.5/site-packages/prewikka/Chart.py", line 301, in render
    nname = name[0:min(len(name), 25)]
TypeError: object of type 'NoneType' has no len()

The other one was hard to catch, it only happens on a fresh install (seems related to a time window too small), on several pages, for ex. Statistics -> Categorizations:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/prewikka/Core.py", line 335, in process
    getattr(view_object, view["handler"])()
  File "/usr/lib/python2.5/site-packages/prewikka/views/stats.py", line 474, in render
    self._renderClassificationsTrend(criteria)
  File "/usr/lib/python2.5/site-packages/prewikka/views/stats.py", line 463, in _renderClassificationsTrend
    "alert.classification.text", criteria, limit = 10, zoom_type="classifications_trend")
  File "/usr/lib/python2.5/site-packages/prewikka/views/stats.py", line 414, in _addTimelineChart
    timeline.render(title)
  File "/usr/lib/python2.5/site-packages/prewikka/Chart.py", line 311, in render
    x_labels = self._labels, series_legend=True, series_colors=colors)
  File "/usr/lib/python2.5/site-packages/prewikka/cairoplot.py", line 2003, in dot_line_plot
    plot.render()
  File "/usr/lib/python2.5/site-packages/prewikka/cairoplot.py", line 458, in render
    self.render_grid()
  File "/usr/lib/python2.5/site-packages/prewikka/cairoplot.py", line 495, in render_grid
    vertical_step = float( self.plot_width ) / ( len( self.labels[HORZ] ) - 1 )
ZeroDivisionError: float division

After about 1 minute, display is ok.

I can confirm everything else reported in #369 is fixed.

Associated revisions

Revision 4dd61575 (diff)
Added by Yoann Vandoorselaere over 14 years ago

Handle tiny timeline range

If the requested timeline range is lower or equal 1 minute, use
a 1 second step. Fix an exception using the Cairoplot backend, and
allow to get meaningful by minute statistics. Refs #370.

Revision 4e68c1f0 (diff)
Added by Yoann Vandoorselaere over 14 years ago

Correctly handle nil values when generating charts

Make sure we always use a replacement ("n/a") when we get a nil
value from the database. Fix exception since the underlying chart
backend didn't support nil value. This closes #370.

History

#1 Updated by Anonymous over 14 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#2 Updated by Yoann VANDOORSELAERE over 14 years ago

  • Target version set to 108

#3 Updated by Yoann VANDOORSELAERE over 14 years ago

  • Target version changed from 108 to 109

#4 Updated by Thomas ANDREJAK almost 9 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 109 to Prelude OSS 1.0.0

Also available in: Atom PDF