-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Description
Hello!
The current upstream code can't handle namedtuples.
Here's an MWE:
import cloudpickle
from collections import namedtuple
X = namedtuple('X', ['a'])
cloudpickle.loads(cloudpickle.dumps(X))Traceback:
Traceback (most recent call last):
File "t.py", line 6, in <module>
cloudpickle.loads(cloudpickle.dumps(X))
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1388, in loads
return Unpickler(file).load()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 864, in load
dispatch[key](self)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1139, in load_reduce
value = func(*args)
File "/Users/amatanhead/Documents/cloudpickle/cloudpickle/cloudpickle.py", line 1043, in _rehydrate_skeleton_class
setattr(skeleton_class, attrname, attr)
AttributeError: attribute '__dict__' of 'type' objects is not writable
robertnishihara and turner11
Metadata
Metadata
Assignees
Labels
No labels