It looks like a bug which would be good to report.
You can probably work around it by using :
float(Dictionary.Get("attention")) instead of Dictionary.Get("attention"). I'm guessing the value of "attention" isn't a number, or at least isn't right away.