From 8862fc695b7fcdfe085c8eadd5af51804200c840 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 14 Sep 2017 01:00:37 -0500 Subject: [PATCH] Handle error when using deepcopy in the collections editor. --- spyder/widgets/variableexplorer/collectionseditor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spyder/widgets/variableexplorer/collectionseditor.py b/spyder/widgets/variableexplorer/collectionseditor.py index 28015ac79b0..fb8a6e2c6ff 100644 --- a/spyder/widgets/variableexplorer/collectionseditor.py +++ b/spyder/widgets/variableexplorer/collectionseditor.py @@ -1305,7 +1305,10 @@ def setup(self, data, title='', readonly=False, width=650, remote=False, else: # unknown object import copy - self.data_copy = copy.deepcopy(data) + try: + self.data_copy = copy.deepcopy(data) + except NotImplementedError: + self.data_copy = copy.copy(data) datalen = len(get_object_attrs(data)) self.widget = CollectionsEditorWidget(self, self.data_copy, title=title, readonly=readonly, remote=remote)