RuntimeError Capture Failed: -2

This error just popped up in code that was previously working. I cannot find any reference to this error code.

Traceback (most recent call last):
File “”, line 518, in
File “”, line 495, in system_reset
File “”, line 21, in init
RuntimeError: Capture Failed: -2
MicroPython v1.12-omv OpenMV v3.6.7 2020-07-20; OPENMV4-STM32H743

Set the pixformat before calling snapshot:

https://github.com/openmv/openmv/blob/master/src/omv/sensor.c#L1334