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

Type error calculating rate on update #6

Open
billsimon opened this issue May 27, 2014 · 0 comments
Open

Type error calculating rate on update #6

billsimon opened this issue May 27, 2014 · 0 comments

Comments

@billsimon
Copy link

On initial load, the calc_rate = true works fine. When I cause an update by changing the time period, the script fails with the following:

AH01215: Traceback (most recent call last):
AH01215:   File "/var/www/html/cloudviz/cloudviz.py", line 196, in <module>
AH01215:     
AH01215: status = main()
AH01215:   File "/var/www/html/cloudviz/cloudviz.py", line 190, in main
AH01215:     
AH01215: results = get_cloudwatch_data(cloudviz_query, request_id, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
AH01215:   File "/var/www/html/cloudviz/cloudviz.py", line 146, in get_cloudwatch_data
AH01215:     
AH01215: if args['calc_rate'] == True and 'Sum' in args['statistics']: d.update({u'Rate': d[u'Sum']/args['period']})
AH01215: TypeError
AH01215: : 
AH01215: unsupported operand type(s) for /: 'float' and 'unicode'
AH01215: 
End of script output before headers: cloudviz.py
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