There seems to be a side effect of calling the python builtin function hasattr on a treedict object that prevents it from pickling:
To recreate:
from pickle import dumps
from treedict import TreeDict
x = TreeDict(y=1)
dumps(x) # this works first time
hasattr(x,'something_random') # returns True, incorrectly
dumps(x) # crashes during pickling
There seems to be a side effect of calling the python builtin function
hasattr
on a treedict object that prevents it from pickling:To recreate: