Based on discussion in the 'need guidance' thread, I started looking into
how to access the Zope ZODB directly from within Python scripts.
I haven't gotten very far yet. I'm still at the beginning of the docs at
trying out the example code.

I got stuck trying to open the Data.fs file in my Zope instance.

Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 from ZODB import FileStorage, DB
 storage = FileStorage.FileStorage('Data.fs')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/ZODB/FileStorage/", line 112, in __init__
    self._lock_file = LockFile(file_name + '.lock')
File "/usr/lib/python2.4/site-packages/ZODB/", line 57, in __init__
    self._fp = open(path, 'r+')
IOError: [Errno 13] Permission denied: 'Data.fs.lock'
 storage = FileStorage.FileStorage('Data.fs')

I tried shutting down the Zope 3 instance, the the same traceback appeared anyway.

I checked to make sure I had the filename right:

 import os

How do I clear the lock on the file?


Zope3-users mailing list

Reply via email to