I'm having a problem with broken objects here.
It's coming when I'm trying to evolve generations and the generation
just touches all objects in the ZODB to store them again with the
non-deprecated classes.

The code is like this:
    storage = context.connection._storage

    next_oid = None
    n = 0
    while True:
        oid, tid, data, next_oid = storage.record_iternext(next_oid)

        obj = context.connection.get(oid)
        # Make sure that we tell all objects that they have been changed. Who
        # cares whether it is true! :-)
        obj._p_changed = True
        if next_oid is None:

2008-11-04T19:40:16 ERROR SiteError 
Traceback (most recent call last):
  File "F:\W\Zope3\src\zope\publisher\publish.py", line 133, in publish
    result = publication.callObject(request, obj)
  File "F:\W\Zope3\src\zope\tal\talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "F:\W\Zope3\src\zope\tal\talinterpreter.py", line 583, in do_setLocal_tal
    self.engine.setLocal(name, self.engine.evaluateValue(expr))
  File "F:\W\Zope3\src\zope\tales\tales.py", line 696, in evaluate
    return expression(self)
  File "F:\W\Zope3\src\zope\tales\expressions.py", line 217, in __call__
    return self._eval(econtext)
  File "F:\W\Zope3\src\zope\tales\expressions.py", line 211, in _eval
    return ob()
  File "F:\W\Zope3\src\zope\app\generations\browser\managers.py", line 182, in 
  File "F:\W\Zope3\src\transaction\_manager.py", line 93, in commit
    return self.get().commit()
  File "F:\W\Zope3\src\transaction\_transaction.py", line 322, in commit
  File "F:\W\Zope3\src\transaction\_transaction.py", line 416, in 
  File "F:\W\Zope3\src\ZODB\Connection.py", line 541, in commit
  File "F:\W\Zope3\src\ZODB\Connection.py", line 586, in _commit
    self._store_objects(ObjectWriter(obj), transaction)
  File "F:\W\Zope3\src\ZODB\Connection.py", line 620, in _store_objects
    p = writer.serialize(obj)  # This calls __getstate__ of obj
  File "F:\W\Zope3\src\ZODB\serialize.py", line 405, in serialize
    meta = klass, newargs()
  File "F:\W\Zope3\src\ZODB\broken.py", line 325, in __getnewargs__
    return self.__Broken_newargs__
AttributeError: 'VocabularyManager' object has no attribute '__Broken_newargs__'

Best regards,
 Adam GROSZER                          mailto:[EMAIL PROTECTED]
Quote of the day:
A grateful thought toward heaven is of itself a prayer. 
- Gotthold Ephraim Lessing 

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to