What steps will reproduce the problem?
1.
import pickle
from iniparse import ConfigParser
cfg = ConfigParser()
cfg.read('my.ini')
out = open('my.ini.pickled','wb')
pickle.dump(cfg.out)
out.close()
del cfg
iin = open('my.ini.pickled','rb')
cfg = pickle.load(iin)
...
2. Using the original ConfigParser seems ok!
What is the expected output? What do you see instead?
Expected: a picklefile
Instead:
Traceback (most recent call last):
File "C:\PyPrg\dev\_testiniparse.py", line 44, in <module>
pickle.dump(cfg,out)
File "C:\Python\lib\pickle.py", line 1362, in dump
Pickler(file, protocol).dump(obj)
File "C:\Python\lib\pickle.py", line 224, in dump
self.save(obj)
File "C:\Python\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "C:\Python\lib\pickle.py", line 419, in save_reduce
save(state)
File "C:\Python\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "C:\Python\lib\pickle.py", line 663, in _batch_setitems
save(v)
File "C:\Python\lib\pickle.py", line 306, in save
rv = reduce(self.proto)
File "C:\Python\lib\copy_reg.py", line 84, in _reduce_ex
dict = getstate()
TypeError: 'Undefined' object is not callable
What version of the product are you using? On what operating system?
Python 2.6 with iniparse 0.2.4 on Windows XP Sp3
Please provide any additional information below.
Using the original ConfigParser seems ok!
Original issue reported on code.google.com by thiel.de...@gmail.com on 10 Feb 2009 at 11:34
Original issue reported on code.google.com by
thiel.de...@gmail.com
on 10 Feb 2009 at 11:34