"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. Advertising

  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. Advertising

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. Harri Pesonen

    Re: Embedding Python in multi-threaded app

    Harri Pesonen, Sep 4, 2003, in forum: Python
    Replies:
    0
    Views:
    822
    Harri Pesonen
    Sep 4, 2003
  2. Tim Peters
    Replies:
    0
    Views:
    563
    Tim Peters
    Oct 30, 2003
  3. ian douglas
    Replies:
    2
    Views:
    971
    Randy Howard
    Jul 30, 2004
  4. Justin C
    Replies:
    4
    Views:
    658
    Rainer Weikusat
    Jul 3, 2012
  5. JL
    Replies:
    10
    Views:
    155
    Grant Edwards
    Oct 4, 2013
Loading...

Share This Page