[Zope-CMF] HCFileStorage
Glenn Pierce
glenn.pierce@odconsultancy.com
28 Jul 2003 15:33:37 +0100
Hi
Can anyone help me in setting up HCFileStorage
I have placed HCFileStorage in the ZODB directory with FileStorage
I have also created a custom_zodb.py with the following contents in my
INSTANCE_HOME
import Globals
import ZODB.HCFileStorage
classes = ('WebPage',)
historyCategories = (('Content with History', classes, 10),)
storage = ZODB.HCFileStorage.HCFileStorage(Globals.BobobaseName,
historyCategories)
DB = ZODB.DB(storage)
(WebPage is basically a Document with OFS.History)
After starting zope for the first time every thing appears to work
however when packing zope's db
I get permission errors of
Traceback (innermost last):
File /usr/lib/zope/lib/python/ZODB/DB.py, line 499, in pack
File /usr/lib/zope/lib/python/ZODB/HCFileStorage.py, line 534, in pack
(Object: /var/lib/zope/instance/default/var/Data.fs)
File /usr/lib/zope/lib/python/ZODB/HCFileStorage.py, line 456, in
_oriPack
(Object: /var/lib/zope/instance/default/var/Data.fs)
IOError: [Errno 13] Permission denied:
'/var/lib/zope/instance/default/var/Data.fs'
Afer changing permissions on the Dat.fs which I know is no solution
(Just wanted to see if it would solve things)
I get
2003-07-28T15:27:18 ERROR(200) ZODB Couldn't load state for
'\x00\x00\x00\x00\x00\x00\x003'
Traceback (innermost last):
File /usr/lib/zope/lib/python/ZODB/Connection.py, line 509, in
setstate
File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 650, in load
(Object: /var/lib/zope/instance/default/var/Data.fs)
File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 625, in _load
(Object: /var/lib/zope/instance/default/var/Data.fs)
ValueError: I/O operation on closed file
I have no doubt that I am using HCFileStorage incorrectly as I can find
no examples.
Any help greatly appreciated.
Thank you
Glenn