Looks to be a bug here: result['Failed'] is dictionary, can not be appended. Why result['Successful'] is a list ? why it is not filled in ?