[Zope3-dev] Problem with partialAnnotatableAdapters
Florian Lindner
mailinglists at xgm.de
Thu May 19 13:02:56 EDT 2005
Hello,
I try to connect a schema field with a dublin core metadata field using
partialAnnotatableAdapterFactory.
I'm logged in as zope.Manager.
My configure.zcml:
<adapter
for=".link.Link"
provides="zope.app.dublincore.interfaces.IZopeDublinCore"
factory=".link.factory"
/>
My link.py:
[...]
from zope.app.dublincore import annotatableadapter
factory = annotatableadapter.partialAnnotatableAdapterFactory(["description"])
the description field is defined in the interface:
description = TextLine (
title = u"Description",
description = u"Description which mirrors the DC metadata.",
required = False)
What is wrong there?
The backtrace is pasted at the end of the mail.
Thanks,
Florian
2005-05-16T17:26:57 ERROR SiteError
http://localhost:8080/cs/home/zope.manager/+/AddCSLink.html%3D
Traceback (most recent call last):
[...]
File "/home/florian/Zope3/src/zope/app/dublincore/timeannotators.py", line
31, in ModifiedAnnotator
dc.modified = datetime.utcnow()
File "/home/florian/Zope3/src/zope/app/dublincore/zopedublincore.py", line
75, in __set__
super(DateProperty, self).__set__(inst, value)
File "/home/florian/Zope3/src/zope/app/dublincore/zopedublincore.py", line
48, in __set__
inst._changed()
File "/home/florian/Zope3/src/zope/app/dublincore/annotatableadapter.py",
line 49, in _changed
self.annotations[DCkey] = self._mapping
File "/home/florian/Zope3/src/zope/app/annotation/attribute.py", line 66, in
__setitem__
annotations = self.obj.__annotations__ = OOBTree()
ForbiddenAttribute: ('__annotations__', <CS.Link.link.Link object at
0xb2a1bd8c>)
127.0.0.1 - zope.manager [16/May/2005:17:26:57 +0200]
"POST /cs/home/zope.manager/+/AddCSLink.html%3D HTTP/1.1" 500 316
"http://localhost:8080/cs/home/zope.manager/+/AddCSLink.html=" "Mozilla/5.0
(compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)"
More information about the Zope3-dev
mailing list