eval() of empty string hangs

Chris Connett chrisccc_3k at yahoo.com
Wed Jul 28 19:33:18 CEST 2004

Peter Hansen wrote:
> Chris Connett wrote:
>> Is it possible that the exception is propagating up the wrong stack?  
>> This is a separate thread, could it be on the main thread somehow?  
>> The creating thread has ended by the time this exception is due to be 
>> raised.  
> This doesn't make sense to me.  What do you mean by 'creating thread'?
> If it's what I think you mean, then either it's not really the
> creating thread, or it hasn't really ended yet... after all, how
> could a thread that has ended cause an exception to occur?

I didn't mean to confuse, just throwing some ideas out, sorry.

Here's the big picture:
A function is called, which creates a Submission object, and then calls 
a sequence of methods on it.  Since this is a normal everyday function, 
the user must wait for it to finish.  So after some basic integrity 
checks, it creates a new thread to do the major processing, which could 
take a significant amount of time.  Once that thread is created and 
started, the function the user called returns, and the user goes on 
their merry way.  The thread from which the user originally called the 
first function should end shortly after that, but as always with 
threading, no guarantees.


Well, I've found the problem.  My own oversight, a NameError in the top 
level except block, I forgot to qualify the name of the Exception being 
caught.  I should have used pychecker, I have no excuse not to have, 
it's installed.  Sorry to have wasted the group's time, but I have 
learned from this greatly.  Nothing like complete embarrassment in front 
of one's peers to make a lesson stick. ;)

More information about the Python-list mailing list