Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'exits': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'it;': 0.16; 'maintainers': 0.16; 'message-id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:access': 0.16; 'tjg': 0.16; '(you': 0.16; 'exception': 0.16; 'prevent': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'module': 0.19; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'received:192.168.100': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'extension': 0.26; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'code': 0.31; 'getting': 0.31; 'that.': 0.31; 'open': 0.33; 'running': 0.33; 'case,': 0.35; 'but': 0.35; 'there': 0.35; 'too': 0.37; 'project': 0.37; 'window': 0.38; 'rather': 0.38; 'how': 0.40; 'skip:u 10': 0.60; 'most': 0.60; "you're": 0.61; 'email addr:gmail.com': 0.63; 'offering': 0.63; 'taking': 0.65; 'minutes': 0.67; 'from:addr:mail': 0.83; 'kicking': 0.84; 'to:none': 0.92 Date: Wed, 03 Jul 2013 14:38:46 +0100 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: python.exe crash if opencv tries to access busy webcam References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372858730 news.xs4all.nl 15943 [2001:888:2000:d::a6]:47044 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49733 On 03/07/2013 14:25, ifelsetrue@gmail.com 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) TJG