using
python 2.4.5
Zope 2.11.1-final
DirectoryStorage 1.1.19
First, is there a more preferable product to use to serve files, mostly PDF,
from the file system with Zope?
I suspect lock_file.py has changed since the DirectoryStorage product was last
updated.
I followed instructions on http://dirstorage.sourceforge.net/install.html to
install DirectoryStorage. I got to step 11. "Start Zope"
and at the end of Traceback 1 (see below)
File
"/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py",
line 12, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file
There are no classes or methods named lock_file in lock_file.py so I changed
the import statement in PosixFilesystem.py to
from ZODB import lock_file
Then the same thing occured in BaseDirectoryStorage.py and I made the same
change to that import statement. (see Traceback 2)
Now (see Traceback 3) I get File
"/usr/local/lib/python2.4/site-packages/DirectoryStorage/LocalFilesystem.py",
line 55, in engage
raise DirectoryStorageError('Storage is locked by another process')
DirectoryStorage.utils.DirectoryStorageError: Storage is locked by another
process
But I'm not sure how to overcome this or is this because the locK_file problem
but I suspect so. I can't find anything
that indicates Storage is locked except for the end of that traceback.
I don't know if I need to do " from ZODB.lock_file import _lock_file " or
something else.
Any help would be appreciated.
Thanks,
Thomas
==
Traceback 1
[EMAIL PROTECTED] bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:16:16 INFO ZServer HTTP server started at Tue Sep 9 12:16:16 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:16:17 INFO Zope Set effective user to "effective_user_here"
^[[ATraceback (most recent call last):
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in
getDatabase
db = factory.open(name, self.databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zope/lib/python/ZODB/config.py", line 97, in open
storage = section.storage.open()
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/config.py",
line 5, in open
from DirectoryStorage.Storage import Storage
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Storage.py",
line 1, in ?
from Filesystem import Filesystem
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Filesystem.py",
line 9, in ?
from PosixFilesystem import PosixFilesystem as Filesystem
File
"/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py",
line 12, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file
===
Traceback 2
[EMAIL PROTECTED] bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:43:22 INFO ZServer HTTP server started at Tue Sep 9 12:43:22 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:43:22 INFO Zope Set effective user to "effective_user_here"
Traceback (most recent call last):
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in
getDatabase
db = factory.open(name, self.databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zope/lib/python/ZODB/conf