Zodbverify: Porting Plone with ZopeDB to Python3

My first Attempt to upgrade a small PloneSite to 5.2 on Py3. All is running fine under 5.2-Py2.

I run zodbverify

>$ ./py2/bin/zodbverify -f var/lexikon/filestorage/Data.fs

I get many Log-Output-Entries like this:

INFO:zodbverify:
Could not process <class 'plone.registry.field.Dict'> record '\x00\x00\x00\x00\x00\x11\x13A':
INFO:zodbverify:'\x80\x02cplone.registry.field\nDict\nq\x01.\x80\x02}q\x02(U\nmin_lengthq\x03K\x00U\x08requiredq\x04\x88U\x0bdescriptionq\x05czope.i18nmessageid.message\nMessage\nq\x06(X1\x00\x00\x00Maps skin names to lists of resource bundle namesq\x07U\x05ploneq\x08NNtRq\tU\x05titleq\nh\x06(X\x1b\x00\x00\x00Resource bundles for themesq\x0bh\x08NNtRq\x0cU\x07defaultq\rNU\x08__name__q\x0eU\x05valueq\x0fU\x17_Element__tagged_valuesq\x10}q\x11U\x08key_typeq\x12U\x08\x00\x00\x00\x00\x00\x11\x13Bq\x13cplone.registry.field\nASCIILine\nq\x14\x86QU\x08readonlyq\x15\x89U\nmax_lengthq\x16NU\tfieldNameq\x17U\x18resourceBundlesForThemesq\x18U\x0edefaultFactoryq\x19NU\tinterfaceq\x1acProducts.ResourceRegistries.interfaces.settings\nIResourceRegistriesSettings\nq\x1bU\nvalue_typeq\x1cU\x08\x00\x00\x00\x00\x00\x11\x13Cq\x1dcplone.registry.field\nList\nq\x1e\x86QU\x07__doc__q\x1fXN\x00\x00\x00Resource bundles for themes\n\nMaps skin names to lists of resource bundle namesq U\rinterfaceNameq!UKProducts.ResourceRegistries.interfaces.settings.IResourceRegistriesSettingsq"u.'
INFO:zodbverify:Traceback (most recent call last):
  File "/Development/Plone/coredev52multipy/py2/eggs/zodbverify-1.0.1-py2.7.egg/zodbverify/verify.py", line 60, in verify_record
    unpickler.load()
ImportError: No module named ResourceRegistries.interfaces.settings

and a Summary at the End:

INFO:zodbverify:Done! Scanned 260308 records. 
Found 190 records that could not be loaded. 
Exceptions and how often they happened: 
ImportError: No module named ResourceRegistries.tools.CSSRegistry: 1
ImportError: No module named Product: 2
AttributeError: 'module' object has no attribute 'IPersistentExtra': 94
ImportError: No module named ResourceRegistries.interfaces.settings: 2
AttributeError: 'module' object has no attribute 'IUndoSupport': 1
ImportError: No module named ResourceRegistries.tools.JSRegistry: 1
ImportError: No module named imagecropping.dx: 89

My Question: What is the general procedure to solve such errors ?

Check this info:

I added

Products.ResourceRegistries
plone.app.imagecropping

to my Buildout and run it. Now the zodbverify script show this output:

Found 185 records that could not be loaded. 
Exceptions and how often they happened: 
AttributeError: 'module' object has no attribute 'IPersistentExtra': 182
ImportError: No module named Product: 2
AttributeError: 'module' object has no attribute 'IUndoSupport': 1

But IPersistentExtra and IUndoSupport lives in https://github.com/zopefoundation/Zope/blob/2.13.29/src/App/interfaces.py
but not in the master https://github.com/zopefoundation/Zope/blob/master/src/App/interfaces.py

I'm confused, My only Idea is to checkout the Zope-Master an add this two Interface Definitions.

1 Like

I'm also seeing these IPersistentExtra and IUndoSupport errors. I didn't find anything when googling them and the Zope repo doesn't yield much info either. Any ideas?

I added this to App/interfaces.py locally

# XXX: might contain non-API methods and outdated comments;
#      not synced with ZopeBook API Reference;
#      based on App.PersistentExtra.PersistentUtil
class IPersistentExtra(Interface):
    pass

# XXX: might contain non-API methods and outdated comments;
#      not synced with ZopeBook API Reference;
#      based on App.Undo.UndoSupport
class IUndoSupport(Interface):
    pass

Plone Foundation Code of Conduct