The code gets stuck in the while loop in capture, if i remove it I only get black images. It also seems like some of the code is missing since the while loop has no definition.
I had the same problem.
For me it was because the camera was not inserted properly.
I switched off the pi, re-inserted the camera and it started working fine.
The code gets stuck in the while loop in capture, if i remove it I only get black images. It also seems like some of the code is missing since the while loop has no definition.