Could not compose the result of multiplySeries

Asked by Srihari Venkatesan on 2012-05-07

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/", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/graphite/webapp/graphite/render/", line 104, in renderView
    seriesList = evaluateTarget(requestContext, target)
  File "/opt/graphite/webapp/graphite/render/", line 10, in evaluateTarget
    result = evaluateTokens(requestContext, tokens)
  File "/opt/graphite/webapp/graphite/render/", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/", line 28, in evaluateTokens
    args = [evaluateTokens(requestContext, arg) for arg in]
  File "/opt/graphite/webapp/graphite/render/", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/", line 29, in evaluateTokens
    return func(requestContext, *args)
  File "/opt/graphite/webapp/graphite/render/", 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

English Edit question
Graphite Edit question
No assignee Edit question
Solved by:
Michael Leinartas
Last query:
Last reply:
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

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?

Thanks Michael Leinartas, that solved my question.

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.

Thanks Michael.