IndexError parsing motioncor2 results

I’m seeing the following error on a MotionCor2 run:

Traceback (most recent call last):
 14   File "cryosparc2_worker/cryosparc2_compute/run.py", line 78, in cryosparc2_compute.run.main
 15   File "cryosparc2_compute/jobs/motioncorrection/run_motioncor2.py", line 422, in run_motioncor2_wrapper
 16     plt.plot(fit_cumulative_patch_shifts[0][:,0],fit_cumulative_patch_shifts[0][:,1],'-k.', label='Patch Motion Alignment')
 17 IndexError: index 0 is out of bounds for axis 0 with size 0

Digging through the code, this is caused because one of the MotionCor2 log files is empty: motioncor2_logs/00-Patch-Patch.log.

First, I think cryosparc could be more defensive here about validating inputs and giving a more pertinent error message in this case.

More to the point, what could be causing the blank output file? Is this a failed MotionCor2 job, or a problem with cryosparc parsing the (legal/expected) output?

Version: v2.13.2

Hi @sbliven,

The MotionCor2 log file is typically empty when something failed with the process itself. Are you able to run the command string that the job outputs in the Overview tab and double check that there is not something wrong with the binary? Also, we made some changes to the MotionCor2 wrapper in v2.15, which you can find here: https://cryosparc.com/blog/new-in-v2-15