Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9784b8c

Browse files
committed
fix pickling
1 parent 6ebb169 commit 9784b8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/traitlets.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ def ex(self, key):
5959

6060
def _default_generator(self, key): pass
6161

62+
def __getstate__(self):
63+
d = self.__dict__.copy()
64+
# remove unpickleable method
65+
d['_default_generator'] = None
66+
return d
67+
6268

6369
class PrivateMethodMixin(object):
6470

0 commit comments

Comments
 (0)