Bobo: Help ! How do I restore my PickleDictionary to a version of 5 hours ago ?
About 5 hours ago, something happened to our Bobo-base.
3 of our users were entering data at the same time.
Now, because Bobo uses a SingleThreadedTransactionManager,
I assume that I should have no fear.
However, something happened and, ever since, we have been
unable to access one of our Bobo-base Persistent objects
(one of the Bobo-bases's top containers; a mucho important one).
We need to be able to reverse to a version of 5 * 3600 seconds
ago (i.e. 5 hours).
interactive session using newpickle.Unpickler directly:
=======================================================
# python
Python 1.4 (Aug 16 1997) [GCC 2.7.2]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Quote:
>>> import newpickle
>>> f = open('dotsss3.db', 'r+b') # my Bobo-base
>>> u = newpickle.Unpickler(f)
>>> x = u.load()
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/local3/lib/python/Bobo/newpickle.py", line 382, in load
self.dispatch[key](self)
File "/usr/local3/lib/python/Bobo/newpickle.py", line 420, in
load_string
self.append(eval(self.readline()[:-1],
ValueError: embedded '\0' in string arg
test script that fails:
=======================
#!/usr/local/bin/python
from SingleThreadedTransaction import Persistent, PickleDictionary,
PersistentMapping
def main():
db = PickleDictionary('/usr/local3/public/dotsss3/dotsss3.db')
d = db['dotsss3']
pc = d.patientCabinet
print pc.creation_date
if __name__ == "__main__":
main()
running the script:
===================
# ./test.py
Traceback (innermost last):
File "./repair.py", line 12, in ?
main()
File "./repair.py", line 9, in main
print pc.creation_date
File "/usr/local3/lib/python/Bobo/PickleJar.py", line 122, in
__getattr__
setstate(self)
File "/usr/local3/lib/python/Bobo/PickleJar.py", line 402, in setstate
try: state = unpickler.load()
File "/usr/local3/lib/python/Bobo/newpickle.py", line 382, in load
self.dispatch[key](self)
KeyError:
--
===============================================================
Alexandre Rousseau ToonBoom Technologies Inc.
Tel : +1.514.278.TOON Montreal (Quebec) H2T 1E4
Fax : +1.514.278.BOOM Canada
===============================================================