cea-hpc/clustershell — Issue #156: Failed to pickle RangeSet object on CentOS 5
Author: thiell
Created: 2012-03-03 16:48:57+00:00
State: open
Labels: Lib/NodeSet

{{{
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ClusterShell.NodeSet import NodeSet
>>> from ClusterShell.NodeSet import RangeSet
>>> import pickle
>>> pickle.dumps(RangeSet("1-100"))
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib64/python2.4/pickle.py", line 1386, in dumps
Pickler(file, protocol, bin).dump(obj)
File "/usr/lib64/python2.4/pickle.py", line 231, in dump
self.save(obj)
File "/usr/lib64/python2.4/pickle.py", line 293, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python2.4/pickle.py", line 739, in save_inst
save(stuff)
File "/usr/lib64/python2.4/pickle.py", line 293, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python2.4/pickle.py", line 663, in save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib64/python2.4/pickle.py", line 677, in _batch_setitems
save(v)
File "/usr/lib64/python2.4/pickle.py", line 293, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python2.4/pickle.py", line 614, in save_list
self._batch_appends(iter(obj))
File "/usr/lib64/python2.4/pickle.py", line 629, in _batch_appends
save(x)
File "/usr/lib64/python2.4/pickle.py", line 293, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python2.4/pickle.py", line 576, in save_tuple
save(element)
File "/usr/lib64/python2.4/pickle.py", line 313, in save
rv = reduce(self.proto)
File "/usr/lib64/python2.4/copy_reg.py", line 69, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle slice objects
}}}