Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'exception': 0.03; 'warnings': 0.03; 'attribute': 0.05; 'context': 0.05; 'debug': 0.05; 'ignored': 0.05; 'python': 0.09; 'nameerror:': 0.09; 'subject: <': 0.09; 'effect,': 0.16; 'fine.': 0.16; 'subject:generator': 0.16; 'subject:object': 0.16; 'tests': 0.18; 'code,': 0.18; 'form:': 0.22; 'skip:_ 20': 0.22; 'split': 0.23; "i've": 0.23; 'tried': 0.25; 'thanks!': 0.26; 'message- id:@mail.gmail.com': 0.27; 'run': 0.28; 'catching': 0.29; 'skip:& 10': 0.29; "skip:' 10": 0.30; 'point': 0.31; 'running': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'hi,': 0.33; 'received:google.com': 0.34; 'otherwise.': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'subject:" ': 0.36; 'success.': 0.36; 'received:209': 0.37; 'unit': 0.38; 'object': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'side': 0.61; 'subject:...': 0.63; 'numerous': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=KF+h5dfZsX+gcigD95MPwCm0UAvW50hvu8hrF9Q8oxQ=; b=uFyv8yectd+FHF2qTIa4jkVj1YJ1pUsMuwD9Q5eRTEkmnJccub33zHCpNy4otWi6NP 1pg6eqazOGLnEQ86NAtml86bCaVfpBHxntCkpho2HXCYs1BaNAAZWFvwNQSFyGplLBGp FmHrzccOVmmiF5oHo8QCY6BqF+JmmMG0EuLE575DanYCxohN08irjb+vlzmOxENIFYHy crivHb63/bTvq7FAoNa+riyrqFEuK/2qRjw4qUdQDEGtnK8OY1GhYgXZq0gjtb0coR7Q S23a8z849gB284A3QKQnp7pVb2ge1ibA2I9OxvA7awcspc5FC1vUPiLEaSKlOSiFpVOJ kCnw== MIME-Version: 1.0 X-Received: by 10.52.71.235 with SMTP id y11mr27813153vdu.43.1360825833928; Wed, 13 Feb 2013 23:10:33 -0800 (PST) Date: Thu, 14 Feb 2013 09:10:33 +0200 Subject: "Exception ... in ignored" Messages From: Ami Tavory To: python-list@python.org Content-Type: multipart/alternative; boundary=20cf3071cd626eb84a04d5a9f469 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: 48 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360825836 news.xs4all.nl 6892 [2001:888:2000:d::a6]:54388 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38850 --20cf3071cd626eb84a04d5a9f469 Content-Type: text/plain; charset=ISO-8859-1 Hi, Running the unit tests for some generator code, prints, as a side effect, numerous messages of the form: ... Exception NameError: "global name 'l' is not defined" in ignored Exception AttributeError: "'NoneType' object has no attribute 'close'" in ignored Exception AttributeError: "'NoneType' object has no attribute 'close'" in ignored ... The tests otherwise run fine. Is there any way to catch the point where such a message originates, and print a traceback? I find it difficult to debug otherwise. I've tried running Python with -W error, catching warnings with context managers, and so forth, but without any success. Thanks! --20cf3071cd626eb84a04d5a9f469 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
=A0 Hi,

=A0 Running the u= nit tests for some generator code, prints, as a side effect, numerous messa= ges of the form:

...
Exception NameError: "global name '= l' is not defined" in <generator object _dagpype_internal_fn_ac= t at 0x9d4c500> ignored
Exception AttributeError: "'NoneType' object has no attribute = 'close'" in <generator object split at 0x7601640> ignore= d
Exception AttributeError: "'NoneType' object has no attri= bute 'close'" in <generator object split at 0x7601690> i= gnored
...

The tests otherwise run fine.

=A0 Is there a= ny way to catch the point where such a message originates, and print a trac= eback? I find it difficult to debug otherwise. I've tried running Pytho= n with -W error, catching warnings with context managers, and so forth, but= without any success.

=A0 Thanks!
--20cf3071cd626eb84a04d5a9f469--