fix log transformation if data is <=0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Graphite |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If you append to use log transformation on data that contains a 0.0 value in it, you will end up with a broken image and debug reports log math function has failed.
I have submitted a patch that simply checks value before calling log math function and ensures values <=0.0 are ignored.
Christian (cboitel) wrote : | #1 |
Jon Stevens (latchkey-gmail) wrote : | #2 |
chrismd (chrismd) wrote : | #3 |
Hm... that stack trace looks a bit odd. The last stack frame says it is in a lambda, which the previous frame doesn't contain. Also I don't see how that exception could be raised from that line of code. My guess is that the running code that threw this exception differs somehow from the code on the filesystem, have you recently updated functions.py? Also can you provide the query-string parameters for the request that threw this error?
chrismd (chrismd) wrote : | #4 |
Thanks for the patch Christian, it works for me
Changed in graphite: | |
status: | New → Fix Committed |
Changed in graphite: | |
status: | Fix Committed → Fix Released |
Seems to partially work, I'm still seeing this stack trace:
Traceback (most recent call last): pymodules/ python2. 6/django/ core/handlers/ base.py" , line 92, in get_response webapp/ graphite/ render/ views.py" , line 97, in renderView target, timeInterval) webapp/ graphite/ render/ evaluator. py", line 14, in evaluateTarget tokens, timeInterval) webapp/ graphite/ render/ evaluator. py", line 30, in evaluateTokens tokens. expression, timeInterval, originalTime) webapp/ graphite/ render/ evaluator. py", line 62, in evaluateTokens webapp/ graphite/ render/ functions. py", line 386, in stdev safeSum( series[ :time]) , time) webapp/ graphite/ render/ functions. py", line 386, in <lambda> safeSum( series[ :time]) , time)
File "/usr/lib/
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/
seriesList = evaluateTarget(
File "/opt/graphite/
result = evaluateTokens(
File "/opt/graphite/
return evaluateTokens(
File "/opt/graphite/
return func(*args)
File "/opt/graphite/
avg = safeDiv(
File "/opt/graphite/
avg = safeDiv(
TypeError: unsupported operand type(s) for *: 'NoneType' and 'NoneType'