Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'cpython': 0.05; "(it's": 0.09; 'executed': 0.09; 'class,': 0.15; 'after).': 0.16; 'getting.': 0.16; 'tracebacks': 0.16; 'syntax': 0.16; 'wrote:': 0.18; 'once,': 0.18; 'received:209.85.210.174': 0.21; 'received :mail-iy0-f174.google.com': 0.21; 'header:In-Reply-To:1': 0.22; 'windows': 0.26; 'code': 0.26; 'load': 0.26; 'function': 0.27; 'import': 0.27; 'pm,': 0.29; 'conditional': 0.30; 'received:192.168.1.3': 0.30; 'error': 0.30; 'message- id:@gmail.com': 0.31; 'does': 0.32; 'header:User-Agent:1': 0.33; 'file': 0.34; 'running': 0.34; 'to:addr:python-list': 0.35; 'but': 0.37; 'received:google.com': 0.37; 'subject:with': 0.37; 'happens': 0.38; 'received:209.85': 0.38; 'received:192': 0.38; 'could': 0.38; 'doing': 0.38; 'received:192.168.1': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'john': 0.61; 'time?': 0.73; 'execution,': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=qhFWift7PznZfFh6IM8aXFf2qQu/ZKKLSANBCRTy+7A=; b=UrVhKDpYpdSai2EDHiN0/Zv854sxYMsdsLXy1iCLY1ID1Wv6nDD42EACjtHxiHmPoP Fc3eIa0qFOOvJXRXzF3GPsfUGR6x9cU/jrvXMr857l6d4KRxCPLCu0oZ7HazJJ34Vc3E r0zTolbN/mPYgQFvXbTM7ILcW/TDT2h65jXiY= Date: Wed, 15 Feb 2012 15:41:51 -0600 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111220 Thunderbird/9.0 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: Script randomly exits for seemingly no reason with strange traceback References: <4f2c6cec$0$29989$c3e8da3$5496439d@news.astraweb.com> <4F2D5D99.4030808@gmail.com> <4f3c238b$0$11951$742ec2ed@news.sonic.net> In-Reply-To: <4f3c238b$0$11951$742ec2ed@news.sonic.net> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329342123 news.xs4all.nl 6944 [2001:888:2000:d::a6]:50527 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20480 On 2/15/2012 3:28 PM, John Nagle wrote: > Are you doing a conditional import, one that takes place after load > time? If you do an import within a function or class, it is executed > when the code around it executes. If you import a file with a > syntax error during execution, you could get the error message you're > getting. It does have conditional imports, but the tracebacks don't occur while that function is running (it's executed once, and this happens well after). -- CPython 3.2.2 | Windows NT 6.1.7601.17640