birv2 wrote:Using official camera module v2, Wheezy on PiNet.
Here's the code I'm using:
from picamera import PiCamera
camera = PiCamera()
camera. start_preview(alpha = 200)
Would I be right in thinking that you're using IDLE3 (the graphical Python interface)? In that case, there's one little bug in your code which won't prevent it recording video but will appear
to make your script fail to end:
The last line is camera.stop_preview rather than camera.stop_preview(). The lack of parentheses just mean that you're effectively asking Python "is there a stop_preview method?" rather than "execute the stop_preview method". In the IDLE environment, the preview doesn't automatically terminate at the script end because the IDLE keeps the Python environment that the script ran in alive (which keeps the camera object alive, which keeps the preview alive).
So (assuming you're using IDLE): your script has recorded video, and it has terminated successfully, but the preview's still going (because stop_preview hasn't been called, just referenced) so you think it's hung.
Anyway, that's my best guess for now!