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

Can't plot a Metrics plot #911

Open
Stan-He opened this issue Feb 25, 2015 · 2 comments
Open

Can't plot a Metrics plot #911

Stan-He opened this issue Feb 25, 2015 · 2 comments

Comments

@Stan-He
Copy link

Stan-He commented Feb 25, 2015

Hi, everyone

This is the first time I post a issue, when I am trying to plot a metrics graph on tko-graphing(web-site), I always get the error log below, I'am using python2.7.5+django1.5.11

TypeError: integer argument expected, got float
Traceback (most recent call last):
File "/usr/local/autotest/frontend/afe/json_rpc/serviceHandler.py", line 100, in dispatchRequest
results['result'] = self.invokeServiceEndpoint(meth, args)
File "/usr/local/autotest/frontend/afe/json_rpc/serviceHandler.py", line 135, in invokeServiceEndpoint
def invokeServiceEndpoint(self, meth, args):
File "/usr/local/autotest/frontend/afe/rpc_handler.py", line 114, in new_fn
return f(_args, *_keyword_args)
File "/usr/local/autotest/frontend/tko/rpc_interface.py", line 255, in create_metrics_plot
queries, plot, invert, normalize, drilldown_callback=drilldown_callback)
File "/usr/local/autotest/frontend/tko/graphing_utils.py", line 646, in create_metrics_plot
File "/usr/local/autotest/frontend/tko/graphing_utils.py", line 474, in _create_image_html
File "/usr/local/autotest/frontend/tko/graphing_utils.py", line 448, in _create_png
image_background = PIL.Image.new(image.mode, image.size,
File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1844, in fromstring
return frombytes(_args, *_kw)
File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1833, in frombytes
im = new(mode, size)
File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1800, in new
return Image()._new(core.fill(mode, size, color))
TypeError: integer argument expected, got float

@lmr
Copy link
Member

lmr commented Feb 27, 2015

This seems related to the fact that these interfaces are deprecated. Could you see if the patch

https://gist.github.com/lmr/2fcfd137dc4e155b2f21

Solves the issue?

@Stan-He
Copy link
Author

Stan-He commented Feb 28, 2015

No,still got the error log--- integer argument expected, got float
TypeError: integer argument expected, got float
Traceback (most recent call last):
File "/usr/local/autotest/frontend/afe/json_rpc/serviceHandler.py", line 100, in dispatchRequest
results['result'] = self.invokeServiceEndpoint(meth, args)
File "/usr/local/autotest/frontend/afe/json_rpc/serviceHandler.py", line 136, in invokeServiceEndpoint
return meth(_args)
File "/usr/local/autotest/frontend/afe/rpc_handler.py", line 114, in new_fn
return f(_args, **keyword_args)
File "/usr/local/autotest/frontend/tko/rpc_interface.py", line 255, in create_metrics_plot
queries, plot, invert, normalize, drilldown_callback=drilldown_callback)
File "/usr/local/autotest/frontend/tko/graphing_utils.py", line 645, in create_metrics_plot
return _create_image_html(figure, area_data, plot_info)
File "/usr/local/autotest/frontend/tko/graphing_utils.py", line 473, in _create_image_html
png, bbox = _create_png(figure)
File "/usr/local/autotest/frontend/tko/graphing_utils.py", line 447, in _create_png
image = PIL.Image.frombytes('RGB', size, image_as_string, 'raw', 'RGB', 0,1)
File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1833, in frombytes
im = new(mode, size)
File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1800, in new
return Image()._new(core.fill(mode, size, color))
TypeError: integer argument expected, got float
qq 20150228132957

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

2 participants