Maybe fixed printTree? Not sure if it actually needed fixing. Added try
clause around import of easygui.