diff --git a/pygubu/uidesigner/widgeteditor.py b/pygubu/uidesigner/widgeteditor.py
index <HASH>..<HASH> 100644
--- a/pygubu/uidesigner/widgeteditor.py
+++ b/pygubu/uidesigner/widgeteditor.py
@@ -315,8 +315,8 @@ class WidgetsTreeEditor:
         selection = tree.selection()
         if selection:
             selected_item = selection[0]
-        text = tree.selection_get(selection='CLIPBOARD')
         try:
+            text = tree.selection_get(selection='CLIPBOARD')
             root = ET.fromstring(text)
             for element in root:
                 data = WidgetDescr(None, None)
@@ -326,6 +326,8 @@ class WidgetsTreeEditor:
             self.draw_widget(selected_item)
         except ET.ParseError as e:
             pass
+        except tk.TclError as e:
+            pass
 
 
     def add_widget(self, wclass):
Fix exception when clipboard is empty.