[MMTK] shelve problem
Jaroslaw Kalinowski
jak at biogeo.uw.edu.pl
Thu Dec 16 23:44:04 CET 2004
Hi,
I was trying to store MMTK objects using shelve module but it failed. I
was doing the following (with lysozyme 102L):
First:
import shelve, MMTK, MMTK.PDB
sd = shelve.open('L.shelve')
co = MMTK.PDB.PDBConfiguration('L.pdb').createPeptideChains()
sd['L'] = co
MMTK.save(co, 'L.pic')
Than:
import shelve, MMTK, MMTK.PDB
print MMTK.load('L.pic')
sd = shelve.open('L.shelve')
print sd['L']
Now, save/load worked ok, but the last instruction produced:
Traceback (most recent call last):
File "2.py", line 6, in ?
print sd['L']
File "/usr/lib/python2.3/shelve.py", line 119, in __getitem__
value = Unpickler(f).load()
File "/usr/lib/python2.3/site-packages/MMTK/Database.py", line 385, in
__getattr__
return getattr(self.type, attr)
...
File "/usr/lib/python2.3/site-packages/MMTK/Database.py", line 385, in
__getattr__
return getattr(self.type, attr)
RuntimeError: maximum recursion depth exceeded
What may be the source of the problem?
Best regards,
Jaroslaw Kalinowski
More information about the mmtk
mailing list