Rendering fails when infinite values are present

Bug #902311 reported by Michael Leinartas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
Undecided
Unassigned

Bug Description

Rendering graphs fails if any of the points contains an 'inf' value (possible when "inf" or "Infinity" is passed as a value to carbon).

Here's the stacktrace:

    Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py", line 100, in get_response
        response = callback(request, *callback_args, **callback_kwargs)
      File "/opt/graphite/webapp/graphite/render/views.py", line 166, in renderView
        image = doImageRender(requestOptions['graphClass'], graphOptions)
      File "/opt/graphite/webapp/graphite/render/views.py", line 338, in doImageRender
        img = graphClass(**graphOptions)
      File "/opt/graphite/webapp/graphite/render/glyph.py", line 174, in __init__
        self.drawGraph(**params)
      File "/opt/graphite/webapp/graphite/render/glyph.py", line 515, in drawGraph
        self.setupYAxis()
      File "/opt/graphite/webapp/graphite/render/glyph.py", line 867, in setupYAxis
        self.yLabelWidth = max([self.getExtents(label)['width'] for label in self.yLabels])
    ValueError: max() arg is an empty sequence

Modifying the safeMax et al functions to filter out 'inf' values resolves the issue for me

Revision history for this message
Michael Leinartas (mleinartas) wrote :
Revision history for this message
Michael Leinartas (mleinartas) wrote :

Fix committed in r703

Changed in graphite:
milestone: none → 0.9.10
status: New → Fix Committed
Changed in graphite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.