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

Already on GitHub? Sign in to your account

Fixing TypeCast errors for time based functions. #166

Merged
merged 1 commit into from Mar 16, 2013

Conversation

Projects
None yet
2 participants
Contributor

jbrucenet commented Mar 11, 2013

Several functions were returning floating point startTime and endTime.

As a result, urls like the following would fail.

/render/?target=keepLastValue(sin("sin"))&from=-5minutes&format=json

The resulting error stack looks like...

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-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 126, in
renderView
timestamps = range(series.start, series.end, series.step)
TypeError: range() integer end argument expected, got float.

Fixing TypeCast errors for time based functions.
Several functions were returning floating point startTime and endTime.

As a result, urls like the following would fail.

/render/?target=keepLastValue(sin("sin"))&from=-5minutes&format=json

The resulting error stack looks like...

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-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 126, in
renderView
    timestamps = range(series.start, series.end, series.step)
TypeError: range() integer end argument expected, got float.
Contributor

jbrucenet commented Mar 11, 2013

I found this while trying to use sin(), time(), and randomWalk() with Tasseo.

mleinart added a commit that referenced this pull request Mar 16, 2013

Merge pull request #166 from jbrucenet/master
Fixing TypeCast errors for time based functions.

@mleinart mleinart merged commit cd59e74 into graphite-project:master Mar 16, 2013

mleinart added a commit that referenced this pull request Mar 16, 2013

Merge pull request #166 from jbrucenet/master
Fixing TypeCast errors for time based functions.
Owner

mleinart commented Mar 16, 2013

Thanks, looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment