AttributeError: Cannot find dynamic object factory for module plone.dexterity.schema.generated
I see this too. This is because no zcml is loaded by the zodbverify
script (and probably also not by the zodbupdate
script). So this utility from plone.dexterity/configure.zcml
is not registered:
<utility
factory=".schema.SchemaModuleFactory"
name="plone.dexterity.schema.generated"
/>
This utility implements plone.alterego.interfaces.IDynamicObjectFactory
. Apparently this utility is needed when determining the dynamic schema of a dexterity item.
I have fixed this in a patch by registering this utility in Python code. Note that in normal use (bin/instance) this would result in a double registration, but the second one is simply ignored by zope.interface, because it is the same. So it should be safe. Code is:
from plone.dexterity.schema import SchemaModuleFactory
from zope.component.hooks import getSiteManager
sm = getSiteManager()
sm.registerUtility(factory=SchemaModuleFactory, name="plone.dexterity.schema.generated")
Another error that we both saw:
ZODB.FileStorage.FileStorage.FileStorageFormatError
Rather unexpectedly, this is caused by the --dry-run
option of the zodbverify
script, as you seem to have noticed too.