python.exe crash if opencv tries to access busy webcam

Tim Golden mail at
Wed Jul 3 15:38:46 CEST 2013

On 03/07/2013 14:25, ifelsetrue at wrote:
> Hello,
> I have a while loop taking images every 5 minutes from webcam.
> Unfortunately, if the camera is busy, python.exe crashes and there is
> no exception to catch. Is there a way to check if camera is busy to
> avoid the crash?

If python.exe crashes -- ie exits completely without a traceback, then
it's most likely a flaw in the extension module which is capturing the
image. If that's the case, there's nothing you can do in Python code to
prevent it; you need to work with the project maintainers to fix that.

If you're getting a traceback but the console window is then closing too
fast for you to see it, then try running the code from an open console
window rather than double-clicking on it. (You don't say how you're
kicking the code off so I'm offering this just in case)


More information about the Python-list mailing list