"Error in sys.excepthook" message from Python 2.3 multi-threaded script

Discussion in 'Python' started by Follower, Oct 27, 2003.

  1. Follower

    Follower Guest

    Hi,

    I've run into an issue which seems to have been discussed previously
    on `python-dev` but only in context of Zope3:

    "Fun with 2.3 shutdown" -- Tim Peters
    <http://mail.python.org/pipermail/python-dev/2003-September/038151.html>

    The following message is displayed (one or more times) when exiting
    (in this case via a `KeyboardInterrupt` exception) a multi-threaded
    Python 2.3 script (on Mac OS X 10.2.1):

    """
    Unhandled exception in thread started by
    Error in sys.excepthook:

    Original exception was:
    """

    It doesn't always happen consistently. As a comparison, I have run the
    same script under Python 2.2.2 and the problem does not seem to occur
    there. (Although, of course, with threads that's no guarantee...)

    I had a look at the bug list on Sourceforge and this issue doesn't
    seem to have made it there yet, so I thought I'd raise it here, partly
    as Google-bait and partly to see if I should re-raise the issue on
    `python-dev`.

    The script in question is a multi-threaded curses framework I'm
    developing, and I can post code if that's useful.

    --Phil.
     
    Follower, Oct 27, 2003
    #1
    1. Advertisements

  2. (Follower) wrote in message news:<>...

    > The following message is displayed (one or more times) when exiting
    > (in this case via a `KeyboardInterrupt` exception) a multi-threaded
    > Python 2.3 script (on Mac OS X 10.2.1):
    >
    > """
    > Unhandled exception in thread started by
    > Error in sys.excepthook:
    >
    > Original exception was:
    > """


    The problem here is that some threads are still alive and kicking when
    the shutdown has reset all module attributes to None. I've had the
    same problem in my test suite for Supybot.

    > The script in question is a multi-threaded curses framework I'm
    > developing, and I can post code if that's useful.


    Exactly. If I remember correctly, no adequate solution was found on
    Python-dev. You may want to either signal for your threads to die and
    wait on their death before actually exiting, if it's an important
    issue.

    Jeremy
     
    Jeremy Fincher, Oct 27, 2003
    #2
    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. David
    Replies:
    0
    Views:
    649
    David
    Sep 24, 2003
  2. GWiz

    Multi-threaded HTTP Module

    GWiz, Oct 16, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    924
    John Timney \( MVP \)
    Oct 16, 2005
  3. Mustafa Demirhan
    Replies:
    0
    Views:
    370
    Mustafa Demirhan
    Nov 9, 2004
  4. Mustafa Demirhan
    Replies:
    0
    Views:
    360
    Mustafa Demirhan
    Nov 9, 2004
  5. ian douglas
    Replies:
    2
    Views:
    1,160
    Randy Howard
    Jul 30, 2004
  6. shooshx
    Replies:
    2
    Views:
    486
  7. Justin C
    Replies:
    4
    Views:
    795
    Rainer Weikusat
    Jul 3, 2012
  8. JL
    Replies:
    10
    Views:
    256
    Grant Edwards
    Oct 4, 2013
Loading...