[ZODB-Dev] Accessing Plone through ZEO back door?

Kirby Urner kirby at 4dsolutions.net
Sat Aug 21 19:37:49 EDT 2004


Let me see if I've got this straight:  Zeo serves the ZODB using 
ClientStorage, but isn't aware of Products, which are at the Zope layer 
(and above).  So the reason I get errors when doing

   >>> storage = ClientStorage.ClientStorage(('localhost',8100))
   >>> db = DB(storage)
   >>> conn = db.open()
   >>> root = conn.root()
   >>> app = root['Application']
   >>> app.reset()

regarding no CMFPlone, has to do with Python via ZEO not knowing about 
Products, yes?

Backing up, is it at all realistic to think about a programmatic back 
door into a Plone instance, like maybe doing some wxPython GUI thing 
that is aware of objects created through a Plone frontend?  Is that a 
supported/encouraged design, or really perverse?

I scoured the web for documentation regarding this question, but Zeo 
seems to be a moving target -- a lot of what I found re configuration 
and so on seemed to be rather dated.  But if there's stuff I should have 
read about all this, I'd be happy for some URLs.

Kirby

PS:  I thought I might solve the whole issue by putting a path to my 
zope instance (/var/zope) in PYTHONPATH, but that didn't help.

==========
 >>> app.reset()
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/opt/Zope-2.7/lib/python/ZODB/Connection.py", line 562, in setstate
     self._set_ghost_state(obj, p)
   File "/opt/Zope-2.7/lib/python/ZODB/Connection.py", line 601, in 
_set_ghost_state
     state = unpickler.load()
   File "/opt/Zope-2.7/lib/python/ZODB/Connection.py", line 198, in 
_persistent_load
     return self[oid]
   File "/opt/Zope-2.7/lib/python/ZODB/Connection.py", line 160, in 
__getitem__
     klass=self._db._classFactory(self, module, name)
   File "/opt/Zope-2.7/lib/python/ZODB/DB.py", line 127, in _classFactory
     return getattr(__import__(location, _globals, _globals, _silly),
ImportError: No module named CMFPlone.Portal




More information about the ZODB-Dev mailing list