[Zope3-dev] Trouble working through Developer's Handbook.

Alec Munro alecmunro at gmail.com
Sun Oct 3 23:29:20 EDT 2004


Hi List,

I'm working through the developers handbook, using the PDF, and a
straight download install.
First off, I think it may be because I'm using the download install of
SVN, but some of the paths in the developers handbook are quite
unclear to me.
For example, it says to install things in the "src" directory.
Neither my install location nor my instance has a "src" directory.
Also, when running the first tests on the messageboard component, I
had to use absolute paths, which I find unusual.

Any of that may relate to the problem I'm having now, but I'm not sure how.

Basically, I have done all the legwork creating the messageboard, and
created "messageboard-configure.zcml", but when I start Zope (as in
step 13.10, though I use runzope instead of makerun), I get:

zope.configuration.config.ConfigurationConflictError: Conflicting
configuration actions

I'm fairly certain I understand what this is supposed to mean, that
there are ZCML directives that conflict with each other. The part that
confuses me is it reports that both the conflicting directives are the
following passage from book/messageboard/configure.zcml

  <content class=".message.Message">
    <implements
        interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
        />
    <implements
        interface="zope.app.container.interfaces.IContentContainer"
        />
    <require
        permission="zope.ManageContent"
        interface=".interfaces.IMessage"
        />
    <require
        permission="zope.ManageContent"
        interface=".interfaces.IMessageContainer"
        />
    <require
        permission="zope.ManageContent"
        set_schema=".interfaces.IMessage"
        />
  </content>

Best I can tell, this section is identical to that in the handbook,
though if I have made a typo, please point it out.
Outside of that idea, this leads me to believe that
messageboard/configure.zcml is being called twice, and the second time
it is creating a conflict. The problem I have with this idea is that
this file has two content areas, and the message one is the second, so
I would suspect that the first would register first in this scenario.


----Solved----

It seems that since Message implements both IMessage, and
IMessageContainer, and both of these declare a "__setitem__" method,
it causes this error. Or at least, that was my interpretation, and
when I commented out the "__setitem__" in IMessage, it began to work.

Even solved as it is, I thought that there might be some value in
this, and perhaps someone can shed more light on what is going on
here.


More information about the Zope3-dev mailing list