detect errors in tree views when tkinter ran out of resources