NameError: name 'body_file' is not defined

I assume body_file is in your spreadsheets. Are you using it in a parameter set to constant instead of each repeat?