https://github.com/cms-analysis/flashggFinalFit/blob/acec1054fca0e0ea77ac6b47ff355bbec1758fb2/Trees2WS/tools/submissionTools.py#L94 This line should use the variable `widx` not `tfidx` as the index of the iteration.