[mod_python] Problems with ZODB / modpython

Thiago Comicio thiagocomicio at gmail.com
Wed Jan 17 15:10:53 EST 2007


I'm trying to install a program that needs mod_python and ZODB. The
program is not running, so I tried to connect to the database through
this script:

from ZODB import FileStorage, DB

def index(req, **params):
        storage = FileStorage.FileStorage('mydatabase.fs')
        db = DB(storage)
        connection = db.open()
        root = connection.root()
        return TestPage().getHTML()

And I received the error below.
Does anybody know how to fix it?




Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
line 213, in handler
    published = publish_object(req, object)

  File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
line 412, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form, req=req))

  File "/usr/lib/python2.4/site-packages/mod_python/util.py", line
439, in apply_fs_data
    return object(**args)

  File "/var/www/html/indico/teste.py", line 4, in index
    storage = FileStorage.FileStorage('mydatabase.fs')

  File "/usr/lib/zope/lib/python/ZODB/FileStorage/FileStorage.py",
line 112, in __init__
    self._lock_file = LockFile(file_name + '.lock')

  File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 60, in __init__
    self._fp = open(path, 'w+')

IOError: [Errno 13] Permission denied: 'mydatabase.fs.lock'

More information about the Mod_python mailing list