Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

holtWintersForecast fails with future dates. #228

Open
thomaslitton opened this issue Oct 19, 2017 · 0 comments
Open

holtWintersForecast fails with future dates. #228

thomaslitton opened this issue Oct 19, 2017 · 0 comments

Comments

@thomaslitton
Copy link

I'm using the holtWintersForecast function with a small amount of data (< 24 hours). If i set the until date 2 weeks ahead of the from date, i get the error below.

Here are the combinations of from and until i was able to reproduce this error:

&from=-15d&until=-1h
&from=-1w&until=20171027 (1 week + 1 day in the future)
&until=20171102 (2 weeks in the future)

If the from and until date were closer on any of the above by 1 day, then it works fine.

Traceback (most recent call last):
File "/srv/graphite-pypy/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/srv/graphite-pypy/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/graphite-pypy/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/graphite-pypy/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/graphite-pypy/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/srv/graphite-pypy/site-packages/graphite_api/app.py", line 401, in render
series_list = evaluateTarget(context, target, data_store)
File "/srv/graphite-pypy/site-packages/graphite_api/app.py", line 496, in evaluateTarget
result = evaluateTokens(requestContext, tokens, data_store)
File "/srv/graphite-pypy/site-packages/graphite_api/app.py", line 506, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression, data_store)
File "/srv/graphite-pypy/site-packages/graphite_api/app.py", line 520, in evaluateTokens
ret = func(requestContext, *args, **kwargs)
File "/srv/graphite-pypy/site-packages/graphite_api/functions.py", line 2261, in holtWintersForecast
analysis = holtWintersAnalysis(bootstrap)
File "/srv/graphite-pypy/site-packages/graphite_api/functions.py", line 2216, in holtWintersAnalysis
next_last_seasonal = getLastSeasonal(i+1)
File "/srv/graphite-pypy/site-packages/graphite_api/functions.py", line 2177, in getLastSeasonal
return seasonals[j]
IndexError: list index out of range

this is similar to: #211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant