[Zope] No module named BTree when using standalone zodb
Sukhwinder Singh
ssruprai@hotmail.com
Tue, 1 Jul 2003 14:56:49 -0700
Now I trying to work directly with zodb.
I am using python 2.2.3 and have downloaded theses versions of standalone
zodb:
ZODB3-3.1.win32-py2.1.exe
ZODB3-3.1.win32-py2.2.exe
ZODB3-3.2b2.win32-py2.2.exe
But when I try this script:
//////////////////////
from ZODB import FileStorage, DB
storage = FileStorage.FileStorage('c:\\database\\var\\data.fs')
db = DB(storage)
connection = db.open()
root = connection.root()
employees = root['employees']
for employee in employees:
print employee.name
//////////////////////////////////
This error message "No module named BTree" is displayed:
Traceback (most recent call last):
File "zodb.py", line 7, in ?
employees = root['employees']
File "D:\APP\PYTHON\lib\UserDict.py", line 14, in __getitem__
def __getitem__(self, key): return self.data[key]
File "D:\APP\PYTHON\Lib\site-packages\ZODB\Connection.py", line 566, in
setstate
self._set_ghost_state(obj, p)
File "D:\APP\PYTHON\Lib\site-packages\ZODB\Connection.py", line 605, in
_set_ghost_state
state = unpickler.load()
File "D:\APP\PYTHON\Lib\site-packages\ZODB\Connection.py", line 203, in
_persistent_load
return self[oid]
File "D:\APP\PYTHON\Lib\site-packages\ZODB\Connection.py", line 163, in
__getitem__
klass=self._db._classFactory(self, module, name)
File "D:\APP\PYTHON\lib\site-packages\ZODB\DB.py", line 126, in
_classFactory
return getattr(__import__(location, _globals, _globals, _silly),name)
ImportError: No module named BTree
Which version of standalone zodb I need to install for this BTree module to
be available.
--Sukhwinder Singh