Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'ZODBReference' object has no attribute '__bases__' #20

Open
1letter opened this issue Jul 18, 2019 · 3 comments · May be fixed by #40
Open

AttributeError: 'ZODBReference' object has no attribute '__bases__' #20

1letter opened this issue Jul 18, 2019 · 3 comments · May be fixed by #40

Comments

@1letter
Copy link

1letter commented Jul 18, 2019

my zodbupdate raise the follwoing error:

Traceback (most recent call last):
  File "/Development/Plone/coredev52multipy/py3/eggs/zope.interface-4.6.0-py3.7-linux-x86_64.egg/zope/interface/declarations.py", line 269, in implementedByFallback
    bases = cls.__bases__
AttributeError: 'ZODBReference' object has no attribute '__bases__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/main.py", line 214, in main
    updater()
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/update.py", line 82, in __call__
    new = self.processor.rename(current)
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/serialize.py", line 333, in rename
    data = unpickler.load()
  File "/Development/Plone/coredev52multipy/py3/eggs/zope.interface-4.6.0-py3.7-linux-x86_64.egg/zope/interface/declarations.py", line 272, in implementedByFallback
    raise TypeError("ImplementedBy called for non-factory", cls)
TypeError: ('ImplementedBy called for non-factory', <zodbupdate.serialize.ZODBReference object at 0x7fe45a0fb5c0>)
Stopped processing, due to: ('ImplementedBy called for non-factory', <zodbupdate.serialize.ZODBReference object at 0x7fe45a0fb5c0>)
Traceback (most recent call last):
  File "/Development/Plone/coredev52multipy/py3/eggs/zope.interface-4.6.0-py3.7-linux-x86_64.egg/zope/interface/declarations.py", line 269, in implementedByFallback
    bases = cls.__bases__
AttributeError: 'ZODBReference' object has no attribute '__bases__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/main.py", line 214, in main
    updater()
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/update.py", line 82, in __call__
    new = self.processor.rename(current)
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/serialize.py", line 333, in rename
    data = unpickler.load()
  File "/Development/Plone/coredev52multipy/py3/eggs/zope.interface-4.6.0-py3.7-linux-x86_64.egg/zope/interface/declarations.py", line 272, in implementedByFallback
    raise TypeError("ImplementedBy called for non-factory", cls)
TypeError: ('ImplementedBy called for non-factory', <zodbupdate.serialize.ZODBReference object at 0x7fe45a0fb5c0>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./py3/bin/zodbupdate", line 265, in <module>
    sys.exit(zodbupdate.main.main())
  File "/Development/Plone/coredev52multipy/py3/eggs/zodbupdate-1.2-py3.7.egg/zodbupdate/main.py", line 218, in main
    raise AssertionError()
AssertionError

Any hints?

@ale-rt
Copy link
Member

ale-rt commented Sep 16, 2020

@1letter did you solved this.
I think I have a solution (adding an empty call to the ZODBReference class).
In my case the object that was causing the error was the acl_users folder.
I got this by inserting a pdb in a try/except around self.processor.rename(current).

In the scope of that function you can get the oid of the object:

(Pdb) ZODB.utils.oid_repr(oid)
'0x01ab'

Then on Py2 you can get info about that object:

[ale@emily zeo]$ ./bin/zopepy src/ZODB/src/ZODB/scripts/fsoids.py Data.fs 0x01ab|grep 0x01ab
oid 0x01ab Products.PluggableAuthService.PluggableAuthService.PluggableAuthService 1 revision
        referenced by 0x01ab Products.PluggableAuthService.PluggableAuthService.PluggableAuthService at 157083378
        references 0x01ab Products.PluggableAuthService.PluggableAuthService.PluggableAuthService at 157083378

I will try to submit a patch.

@1letter
Copy link
Author

1letter commented Sep 16, 2020

I can't remember that anymore. Upps. But if i see the timestamp, then the site it was an ugly old site with an old ldap /usercreation pas plugin. Sorry.

@ale-rt
Copy link
Member

ale-rt commented Sep 16, 2020

Thanks anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants