IndexError: index 0 is out of bounds for axis 0 with size 0 Export to Spreadsheet

I’m getting the above error when trying to run a short pipeline with a set of 384 images. The pipeline uses the MeasureImageQuality, ExportToSpreadsheet, and ExportToDatabase modules. CellProfiler 3.1.8 is being used. I’ve seen several posts with a similar error, but none of them had clear answers and some had answers along the lines of ‘it will be fixed in the next version’. But I don’t think that would be the problem because when I try using the exact same pipeline with a different set of similar images, it runs without any errors. Does anyone have any idea why it runs with one but not the other? The only difference between the images is the number of images.

QC_entireplateSonja.cppipe (16.9 KB)
I’ve attached the pipeline here.