Could not compose the result of multiplySeries

Asked by Srihari Venkatesan

I am trying to do sumSeries(multiplySeries(seriesA, seriesB)) using Carbon-0.9.10-pre release. This gives me this error:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/graphite/webapp/graphite/render/views.py", line 104, in renderView
    seriesList = evaluateTarget(requestContext, target)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 10, in evaluateTarget
    result = evaluateTokens(requestContext, tokens)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 28, in evaluateTokens
    args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 29, in evaluateTokens
    return func(requestContext, *args)
  File "/opt/graphite/webapp/graphite/render/functions.py", line 143, in sumSeries
    name = "sumSeries(%s)" % ','.join(set([s.pathExpression for s in seriesList]))
AttributeError: 'TimeSeries' object has no attribute 'pathExpression'

Am I doing something wrong? Thanks for you help.

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Leinartas
Solved:
Last query:
Last reply:
Revision history for this message
Best Michael Leinartas (mleinartas) said :
#1

You did indeed uncover a bug, though I dont think this is what you want to do.

MultiplySeries accepts multiple series and returns a single series as product. sumSeries does the same. In this case, you're only feeding a single series to sumSeries so it's just going to return the same series back.

The bug here is that multiplySeries creates a new series without setting a pathExpression. I've gone through and ensured any functions which return a newly created series create this pathExpression so that they can be input into functions which require it such as sumSeries. This fix will make it into the 0.9.10 release

Revision history for this message
Srihari Venkatesan (harisuthan) said :
#2

Thanks Michael for responding back so quick and fixing it in next release. I just want to show you a toy example to reproduce, in reality I will be summing the output of many multiplySeries.

When are you planning to release 0.9.10?

Revision history for this message
Srihari Venkatesan (harisuthan) said :
#3

Thanks Michael Leinartas, that solved my question.

Revision history for this message
Michael Leinartas (mleinartas) said :
#4

I'm going to cut an 0.9.10-pre2 tonight with the fix I mentioned above and a couple other small fixes. The final release should come within a week or two - certainly by the end of the month.

Revision history for this message
Srihari Venkatesan (harisuthan) said :
#5

Thanks Michael.