cloudviz
cloudviz copied to clipboard
Type error calculating rate on update
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