Fixed Violation to_dict()

TypeError: not all arguments converted during string formatting