[ZODB-Dev] Broken instances after refactoring in ZODB

Adam adamauckland at gmail.com
Fri Oct 3 06:37:35 EDT 2008


Hi, I wonder if anyone can help me.

I've got a custom Python cgi which runs in one directory using ZODB for
the database. It runs in a directory off the site root ie. /System

It's got a bit unwieldy in there so I wanted to separate the core
modules out as I don't really touch them any more, so adding
subdirectories:

/System/Core
/System/Application

In System, I created a dummy frontend CGI like the following:

# /System/frontend.py
import ZODB
from Core import *
from Application import *
site = Start.ProcessRequest()  # Start is a module in Core
site.Main()

For some reason, all the Persistent derived objects in the database are
returning:  <broken Module.Class instance>

Does ZODB do something with __import__ modules which may cause it to
lose the references to the classes/modules?

Is there any way to fix the database or do I have to return to putting
all my .py files in one directory.

Many thanks,

Adam 




More information about the ZODB-Dev mailing list