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: 'NoneType' object has no attribute '_getReferenceAnnotations during migration #41

Closed
pbauer opened this issue Apr 9, 2013 · 6 comments

Comments

@pbauer
Copy link
Member

pbauer commented Apr 9, 2013

2013-04-09 16:36:20 ERROR OFS.subscribers _delObject() threw
Traceback (most recent call last):
  File "/Users/philip/.cache/buildout/eggs/Zope2-2.13.19-py2.7.egg/OFS/subscribers.py", line 155, in callManageBeforeDelete
    ob.manage_beforeDelete(item, container)
  File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/BaseContent.py", line 51, in manage_beforeDelete
    BaseObject.manage_beforeDelete(self, item, container)
  File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/BaseObject.py", line 170, in manage_beforeDelete
    Referenceable.manage_beforeDelete(self, item, container)
  File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/Referenceable.py", line 295, in manage_beforeDelete
    self.deleteReferences()
  File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/Referenceable.py", line 63, in deleteReferences
    return tool.deleteReferences(self, relationship)
  File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 354, in deleteReferences
    self._deleteReference(b)
  File "/Users/philip/.cache/buildout/eggs/Products.Archetypes-1.8.7-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 564, in _deleteReference
    annotation = sobj._getReferenceAnnotations()
AttributeError: 'NoneType' object has no attribute '_getReferenceAnnotations'
@jensens
Copy link
Member

jensens commented Sep 4, 2013

I can confirm this.

@pbauer
Copy link
Member Author

pbauer commented Feb 10, 2014

@jensens I can't reproduce this anymore. Can we close this issue?

@jensens
Copy link
Member

jensens commented Feb 10, 2014

Its been a while. I dont have a setup around anymore to test it. Sorry.

@pbauer
Copy link
Member Author

pbauer commented Feb 11, 2014

Since we can't reproduce this anymore I'll close it.

@pbauer pbauer closed this as completed Feb 11, 2014
@MrTango MrTango reopened this Apr 18, 2015
@MrTango
Copy link
Contributor

MrTango commented Apr 18, 2015

Same error here:

2015-04-18T15:01:47 INFO plone.app.contenttypes.migration.browser Start migrating 6169 objects from ATBlob to File
------
2015-04-18T15:03:30 ERROR OFS.subscribers _delObject() threw
Traceback (most recent call last):
  File "/data/plone/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/OFS/subscribers.py", line 155, in callManageBeforeDelete
    ob.manage_beforeDelete(item, container)
  File "/data/plone/Plone/buildout-cache/eggs/Products.Archetypes-1.9.7-py2.7.egg/Products/Archetypes/BaseContent.py", line 51, in manage_beforeDelete
    BaseObject.manage_beforeDelete(self, item, container)
  File "/data/plone/Plone/buildout-cache/eggs/Products.Archetypes-1.9.7-py2.7.egg/Products/Archetypes/BaseObject.py", line 170, in manage_beforeDelete
    Referenceable.manage_beforeDelete(self, item, container)
  File "/data/plone/Plone/buildout-cache/eggs/Products.Archetypes-1.9.7-py2.7.egg/Products/Archetypes/Referenceable.py", line 295, in manage_beforeDelete
    self.deleteReferences()
  File "/data/plone/Plone/buildout-cache/eggs/Products.Archetypes-1.9.7-py2.7.egg/Products/Archetypes/Referenceable.py", line 63, in deleteReferences
    return tool.deleteReferences(self, relationship)
  File "/data/plone/Plone/buildout-cache/eggs/Products.Archetypes-1.9.7-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 354, in deleteReferences
    self._deleteReference(b)
  File "/data/plone/Plone/buildout-cache/eggs/Products.Archetypes-1.9.7-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 566, in _deleteReference
    annotation = sobj._getReferenceAnnotations()
AttributeError: 'NoneType' object has no attribute '_getReferenceAnnotations'
Waiting for data... (interrupt to abort)

How did you solved that for you?
Plone 4.3.3
plone.dexterity = 2.2.4
plone.app.dexterity = 2.0.12
plone.app.contenttypes = 1.1b3
plone.app.event = 1.1.4
plone.app.portlets = 2.5.1
Products.Archetypes = 1.9.9
plone.app.widgets = 1.7.1

pbauer added a commit to plone/Products.Archetypes that referenced this issue Jun 21, 2017
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Jul 4, 2017
Branch: refs/heads/master
Date: 2017-06-21T10:10:38+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: plone/Products.Archetypes@83a04f0

Prevent AttributeError on deleting a Reference from a object that is gone.
Fixes plone/plone.app.contenttypes#41

Files changed:
M CHANGES.rst
M Products/Archetypes/ReferenceEngine.py
Repository: Products.Archetypes
Branch: refs/heads/master
Date: 2017-07-04T17:49:39+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: plone/Products.Archetypes@51bca84

Merge pull request #91 from plone/fix_delete_reference

Prevent AttributeError on deleting a Reference

Files changed:
M CHANGES.rst
M Products/Archetypes/ReferenceEngine.py
@Netroxen
Copy link
Member

Netroxen commented Jul 20, 2017

I'm getting this error as well, referenceObject.getSourceObject() returns nothing in my case...

2017-07-20 13:31:00 INFO plone.app.contenttypes.migration.browser Start migrating 3 objects from ATTopic to Collection
----------------------------------------------------------------------------------------------------------------------
2017-07-20 13:31:00 ERROR OFS.subscribers _delObject() threw
Traceback (most recent call last):
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/OFS/subscribers.py", line 155, in callManageBeforeDelete
    ob.manage_beforeDelete(item, container)
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Products.Archetypes-1.10.16-py2.7.egg/Products/Archetypes/BaseFolder.py", line 105, in manage_beforeDelete
    BaseObject.manage_beforeDelete(self, item, container)
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Products.Archetypes-1.10.16-py2.7.egg/Products/Archetypes/BaseObject.py", line 174, in manage_beforeDelete
    Referenceable.manage_beforeDelete(self, item, container)
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Products.Archetypes-1.10.16-py2.7.egg/Products/Archetypes/Referenceable.py", line 297, in manage_beforeDelete
    self.deleteReferences()
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Products.Archetypes-1.10.16-py2.7.egg/Products/Archetypes/Referenceable.py", line 63, in deleteReferences
    return tool.deleteReferences(self, relationship)
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Products.Archetypes-1.10.16-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 354, in deleteReferences
    self._deleteReference(b)
  File "/home/jesse/Development/plone/plone507.site/buildout-cache/eggs/Products.Archetypes-1.10.16-py2.7.egg/Products/Archetypes/ReferenceEngine.py", line 571, in _deleteReference
    annotation = sobj._getReferenceAnnotations()
AttributeError: 'NoneType' object has no attribute '_getReferenceAnnotations'

(Migration from Plone 4.3.14 to 5.0.7)

fredvd added a commit to plone/Products.Archetypes that referenced this issue Aug 1, 2018
 from object that is gone.
Backport from master #91. Fixes plone/plone.app.contenttypes#41.
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Aug 5, 2018
Branch: refs/heads/1.9.x
Date: 2018-08-01T13:37:59+02:00
Author: Fred van Dijk (fredvd) <[email protected]>
Commit: plone/Products.Archetypes@7bc06f0

Prevent AttributeError on deleting a Reference
 from object that is gone.
Backport from master #91. Fixes plone/plone.app.contenttypes#41.

Files changed:
M CHANGES.rst
M Products/Archetypes/ReferenceEngine.py
Repository: Products.Archetypes

Branch: refs/heads/1.9.x
Date: 2018-08-05T16:45:17+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/Products.Archetypes@7068c71

Merge pull request #110 from plone/fix_delete_reference

Prevent AttributeError on deleting a Reference

Files changed:
M CHANGES.rst
M Products/Archetypes/ReferenceEngine.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants