You Are Here Home > Python “Unhandled exception in thread started by...

Python “Unhandled exception in thread started by Error in sys.excepthook:”

I was getting this error message and I was using a Queue object to queue some jobs and block everything until all threads are done with:

the_queue.join()

Well, in my particular case, I was getting these error messages the work was not done in worker threads:

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

Original exception was:

So what I did was this:

threads = []
for i in range(0, max_threads):
   thread = Worker()
   thread.start()
   threads.append(thread)
 
# And then...
for thread in threads:
   thread.join()

And this fixed my issue, this will make sense to people with this problem ;)

Python “Unhandled exception in thread started by Error in sys.excepthook:”
Filed under: Programming, Python   Posted by: Codehead on May 6, 2009

Disclaimer
1 - Use the information provided here at your own risk.
2 - You may not republish this content without prior written consent.




No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment