[ZODB-Dev] Convert a ZODB 3.2 -> ZODB 3.3
Chris Cioffi
evenprimes at gmail.com
Thu Oct 7 09:31:20 EDT 2004
Hi all,
I've got a stand alone ZODB app. I can create new file storage files
no problem, but now I need to access the data from an older v3.2 file
storage file and I'm getting the error:
No handlers could be found for logger "ZODB.FileStorage"
C:\Python23\Lib\site-packages\Persistence\__init__.py:25: UserWarning:
Couldn't import the ExtensionClass-based base class
...
Now, all I want to do is open the old storage and move it into a new
fs file. (I'm doing it that way since the data structure has been
overhauled.)
Here's my open function:
import ZODB
from ZODB import FileStorage, DB
def open_zodb(Path):
"""Open ZODB.
Returns a tuple consisting of:(root,connection,db,storage)
The same tuple must be passed to close_zodb() in order to close the DB.
"""
# Connect to DB
storage = FileStorage.FileStorage(Path)
db = DB(storage)
connection = db.open()
root = connection.root()
return (root,connection,db,storage)
This is from a tutorial on using ZODB and it's been working fine until now.
Some more info: This works fine when ZODB 3.2 is installed and I open
a v3.2 fs. And it works fine when v3.3 is installed and
accessing/creating v3.3 fs. It is only failing when I have v3.3
installed and am trying to access v3.2 data.
Thanks!
Chris
--
<a href="http://spreadfirefox.com/community/?q=affiliates&id=0&t=1">Get
Firefox!</a>
More information about the ZODB-Dev
mailing list