graphite-api icon indicating copy to clipboard operation
graphite-api copied to clipboard

I use the graph-index with garphite-api , and found error as below.

Open niebaopeng opened this issue 9 years ago • 3 comments
trafficstars

the graph data has datapoints less than 1d , and graph-index default draw graph -1d , -7d , -1mon ,-1y

The four type graphs don't display , and got the error.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/graphite_api/app.py", line 455, in render
    image = doImageRender(request_options['graphClass'], graph_options)
  File "/usr/local/lib/python2.7/dist-packages/graphite_api/app.py", line 591, in doImageRender
    img = graphClass(**graphOptions)
  File "/usr/local/lib/python2.7/dist-packages/graphite_api/render/glyph.py", line 383, in __init__
    self.drawGraph(**params)
  File "/usr/local/lib/python2.7/dist-packages/graphite_api/render/glyph.py", line 895, in drawGraph
    self.setupYAxis()
  File "/usr/local/lib/python2.7/dist-packages/graphite_api/render/glyph.py", line 1426, in setupYAxis
    self.getExtents(label)['width'] for label in self.yLabels])
ValueError: max() arg is an empty sequence

niebaopeng avatar Dec 02 '15 09:12 niebaopeng

Can you provide the full graph URL?

brutasse avatar Dec 02 '15 14:12 brutasse

http://111.206.127.17:1999/render/?target=scale%28servers.some_switch_mydomain_org.if_errors-XGigabitEthernet0_0_15.rx,8%29&target=scale%28servers.some_switch_mydomain_org.if_errors-XGigabitEthernet0_0_15.tx,8%29&hideLegend=False&from=-1d&width=600&title=some_switch_mydomain_org%20if_errors-XGigabitEthernet0_0_15%20-%20day&height=400

niebaopeng avatar Dec 03 '15 06:12 niebaopeng

IF I add yMin & YMax params , then it works

niebaopeng avatar Dec 03 '15 06:12 niebaopeng