"Exception ... in <generator object ...> ignored" Messages

Discussion in 'Python' started by Ami Tavory, Feb 14, 2013.

  1. Ami Tavory

    Ami Tavory Guest

    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 <generator object
    _dagpype_internal_fn_act at 0x9d4c500> ignored
    Exception AttributeError: "'NoneType' object has no attribute 'close'" in
    <generator object split at 0x7601640> ignored
    Exception AttributeError: "'NoneType' object has no attribute 'close'" in
    <generator object split at 0x7601690> 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!
     
    Ami Tavory, Feb 14, 2013
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rukmal Fernando
    Replies:
    4
    Views:
    1,055
    Richard Grimes [MVP]
    Oct 27, 2003
  2. piyush
    Replies:
    0
    Views:
    1,997
    piyush
    Jul 14, 2004
  3. Robert Rossney
    Replies:
    1
    Views:
    1,060
    netnews.microsoft.com
    Mar 1, 2005
  4. gary artim

    recordset error/perl messages

    gary artim, Feb 6, 2004, in forum: Perl
    Replies:
    0
    Views:
    596
    gary artim
    Feb 6, 2004
  5. Thomas Connolly

    Validation Summary not showing error messages

    Thomas Connolly, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    804
    Thomas Connolly
    Jul 9, 2003
  6. Duy Nguyen

    sending SMS messages to mobile phone

    Duy Nguyen, Aug 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    434
    Duy Nguyen
    Aug 9, 2003
  7. Gary

    Error messages

    Gary, Aug 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    631
    Kevin Spencer
    Aug 13, 2003
  8. Onur Bozkurt

    All messages in the newsgroup.

    Onur Bozkurt, Aug 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    356
    Jason \(MFT1\)
    Aug 16, 2003
Loading...