This is clearly a bug in web2py's messagebox handler as it could be trying 
to create a new TK mainloop while the previous one is not yet destroyed. TK 
only allows one mainloop.  

Try something for me and see if it works.

add this to the beginning of gluon/messageboxhandler.py

import threading

mblock = threading.Lock()


then in the emit function put everything there inside a with mblock:

    def emit(self, record):
        with mblock:
            if tkinter:
                (...)


This is still not the ideal fix as it will lock the threads waiting for you 
to close the message box if they try to log something. Ideally someone 
would make a "logger thread" that would be running TK mainloop then emit 
would simply queue the log messages to this "logger thread" that would 
display messageboxes until the queue was empty and then wait for more.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to