从4.0.4升级到4.0.10 - TypeError:不能将实现者与类一起使用。请改用其中一个类声明函数

时间:2013-11-25 00:52:39

标签: plone dexterity

我有一个使用Dexterity的(工作)Plone 4.0.4网站。我正在尝试将其升级到4.0.10。当我在新的(4.0.10)站点上启动实例时,我收到错误:

    TypeError: Can't use implementer with classes.  Use one of the class-declaration functions instead.

(下面的完整回溯) 此错误似乎来自zope.interface,显然它必定是由新网站的版本集的某些问题引起的,因为其他一切都是相同的。 plone.app.dexterityzope.interface的版本在两个网站上都相同。

我不知道在哪里寻找解决方案,欢迎任何建议!

追溯:http://pastie.org/8506203

bin / instance:http://pastie.org/8506250

谢谢!

Traceback (most recent call last):
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/OFS/Application.py", line 671, in install_product
    initmethod(context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/__init__.py", line 31, in initialize
    zcml.load_site()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/zcml.py", line 51, in load_site
    _context = xmlconfig.file(file)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 647, in file
    include(context, name, package)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/fiveconfigure.py", line 74, in loadProducts
    handleBrokenProduct(product)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/fiveconfigure.py", line 72, in loadProducts
    xmlconfig.include(_context, zcml, package=product)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
    includeZCMLGroup(_context, info, filename)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
    include(_context, filename, includable_package)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 54, in includeDependenciesDirective
    includeZCMLGroup(_context, info, 'configure.zcml')
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
    include(_context, filename, includable_package)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 684, in finish
    args = toargs(context, *self.argdata)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 1376, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/fields.py", line 139, in fromUnicode
    value = self.context.resolve(name)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 180, in resolve
    mod = __import__(mname, *_import_chickens)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.app.dexterity-1.2.1-py2.6.egg/plone/app/dexterity/browser/types.py", line 14, in <module>
    from plone.z3cform.crud import crud
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.z3cform-0.7.8-py2.6.egg/plone/z3cform/crud/crud.py", line 14, in <module>
    import z3c.batching.batch
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.batching-2.0.0-py2.6.egg/z3c/batching/batch.py", line 27, in <module>
    class Batch(object):
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.interface-3.5.3-py2.6-linux-x86_64.egg/zope/interface/declarations.py", line 496, in __call__
    raise TypeError("Can't use implementer with classes.  Use one of "
ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/parts/instance1/etc/site.zcml", line 16.2-16.23
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Plone-4.0.10-py2.6.egg/Products/CMFPlone/configure.zcml", line 94.4-98.10
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/src/ecobuilding.content/ecobuilding/content/configure.zcml", line 10.4-10.39
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.app.dexterity-1.2.1-py2.6.egg/plone/app/dexterity/configure.zcml", line 33.4-33.34
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.app.dexterity-1.2.1-py2.6.egg/plone/app/dexterity/browser/configure.zcml", line 47.4-52.51
    TypeError: Can't use implementer with classes.  Use one of the class-declaration functions instead.
Traceback (most recent call last):
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Zope2/Startup/run.py", line 56, in <module>
    run()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Zope2/Startup/run.py", line 21, in run
    starter.prepare()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py", line 87, in prepare
    self.startZope()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py", line 264, in startZope
    Zope2.startup()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Zope2/__init__.py", line 47, in startup
    _startup()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Zope2/App/startup.py", line 116, in startup
    OFS.Application.initialize(application)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/OFS/Application.py", line 251, in initialize
    initializer.initialize()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/OFS/Application.py", line 279, in initialize
    self.install_products()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/OFS/Application.py", line 492, in install_products
    return install_products(app)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/OFS/Application.py", line 523, in install_products
    folder_permissions, raise_exc=debug_mode)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/OFS/Application.py", line 671, in install_product
    initmethod(context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/__init__.py", line 31, in initialize
    zcml.load_site()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/zcml.py", line 51, in load_site
    _context = xmlconfig.file(file)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 647, in file
    include(context, name, package)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/fiveconfigure.py", line 74, in loadProducts
    handleBrokenProduct(product)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Zope2-2.12.20-py2.6-linux-x86_64.egg/Products/Five/fiveconfigure.py", line 72, in loadProducts
    xmlconfig.include(_context, zcml, package=product)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
    includeZCMLGroup(_context, info, filename)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
    include(_context, filename, includable_package)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 54, in includeDependenciesDirective
    includeZCMLGroup(_context, info, 'configure.zcml')
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.autoinclude-0.3.5-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
    include(_context, filename, includable_package)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 685, in finish
    actions = self.handler(context, **args)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/local/python_git/parts/opt/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 537, in end
    self.stack.pop().finish()
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 684, in finish
    args = toargs(context, *self.argdata)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 1376, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/fields.py", line 139, in fromUnicode
    value = self.context.resolve(name)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py", line 180, in resolve
    mod = __import__(mname, *_import_chickens)
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.app.dexterity-1.2.1-py2.6.egg/plone/app/dexterity/browser/types.py", line 14, in <module>
    from plone.z3cform.crud import crud
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.z3cform-0.7.8-py2.6.egg/plone/z3cform/crud/crud.py", line 14, in <module>
    import z3c.batching.batch
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/z3c.batching-2.0.0-py2.6.egg/z3c/batching/batch.py", line 27, in <module>
    class Batch(object):
  File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/zope.interface-3.5.3-py2.6-linux-x86_64.egg/zope/interface/declarations.py", line 496, in __call__
    raise TypeError("Can't use implementer with classes.  Use one of "
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/parts/instance1/etc/site.zcml", line 16.2-16.23
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/Plone-4.0.10-py2.6.egg/Products/CMFPlone/configure.zcml", line 94.4-98.10
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/src/ecobuilding.content/ecobuilding/content/configure.zcml", line 10.4-10.39
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.app.dexterity-1.2.1-py2.6.egg/plone/app/dexterity/configure.zcml", line 33.4-33.34
    ZopeXMLConfigurationError: File "/usr/local/zope/prod/Zope-2.12.20/plone4.0.10/eggs/plone.app.dexterity-1.2.1-py2.6.egg/plone/app/dexterity/browser/configure.zcml", line 47.4-52.51
    TypeError: Can't use implementer with classes.  Use one of the class-declaration functions instead.

2 个答案:

答案 0 :(得分:3)

此错误指的是使用'implementationmen'作为类装饰器,例如:

@implementer(IBatch)
class Batch(object):
    ...
作为类装饰器的

'实现者'是在zope.interface 4.0.0中引入的,以支持Python 3,其中'implements'使用的经典“类建议”机制不再有效。

Plone 4.0不使用zope.interface这样的新版本。你的问题正在发生,因为你最终得到了一个新版本的z3c.batching,它试​​图使用'实现者'。这表明您没有使用Plone 4.0.10正确固定Dexterity的版本集。

您可以在此处找到正确的引脚集:http://good-py.appspot.com/release/dexterity/1.2.1?plone=4.0.10

答案 1 :(得分:1)

幸运的是,我确实拥有该网站的工作副本的tarball,因此在精心制作所有版本之后,我能够找到一个起始Zope。 没有保证,但这些是我到目前为止的版本引脚:

http://dist.plone.org/release/4.0.10/versions.cfg

Products.PloneHotfix20110720 = 1.1
Products.PloneHotfix20110531 = 2.0
Products.PloneHotfix20110928 = 1.1
Products.PloneHotfix20130618 = 1.3
Products.PloneHotfix20121106 = 1.2
Products.Zope-Hotfix-20110622 = 1.0

Products.TinyMCE = 1.2.12
plone.autoform = 1.1

Products.Maps = 3.3
fourdigits.portlet.twitter = 1.0a14
collective.js.moment = 1.0.1
buildout.sanitycheck = 1.0b1

Products.TinyMCE = 1.2.12
z3c.form = 2.4.4
zope.schema = 3.7.1
zope.browserresource = 3.9.0
z3c.baseregistry = 1.2.0
Products.PloneFormGen = 1.6.7
zc.table = 0.8.0
five.intid = 0.5.0
collective.pfg.creditcardfields = 1.2
plone.dexterity = 1.1.2
zope.filerepresentation = 3.6.0
five.grok = 1.1.1
plone.app.intid = 1.0b3
Products.DataGridField = 1.8a1
Products.PloneKeywordManager = 1.8
ZODB3 = 3.9.7
Zope2 = 2.12.22
beatbox = 19.0
collective.autopermission = 1.0b1
collective.googleanalytics = 1.4
collective.monkeypatcher = 1.0.1
collective.recaptcha = 1.1.1
collective.salesforce.authplugin = 1.5
collective.z3cform.datetimewidget = 1.1.1
collective.z3cform.wizard = 1.3.3
dateable.kalends = 0.5
grokcore.annotation = 1.1
grokcore.component = 1.7
grokcore.formlib = 1.4
grokcore.security = 1.2
grokcore.site = 1.1
grokcore.view = 1.12.2
grokcore.viewlet = 1.3
hexagonit.swfheader = 1.0.1
martian = 0.11.2
p4a.common = 1.0.6
pfg.donationform = 1.1
plone.app.caching = 1.0b1
plone.app.discussion = 1.1
plone.app.registry = 1.0b2
plone.app.relationfield = 1.1
plone.app.uuid = 1.0b2
plone.app.z3cform = 0.5.7
plone.autoform = 1.1
plone.cachepurging = 1.0b1
plone.caching = 1.0b1
plone.formwidget.contenttree = 1.0.5
plone.outputfilters = 1.6
plone.registry = 1.0b2
plone.supermodel = 1.0.3
plone.transformchain = 1.0b1
plone.uuid = 1.0b2
python_dateutil = 1.5
qi.portlet.TagClouds = 1.32
z3c.batching = 1.1.0
zc.resourcelibrary = 1.3.1

z3c.autoinclude = 0.3.5

Pillow = 2.2.1
Products.Carousel = 2.2
Products.Clouseau = 1.0
Products.DocFinderTab = 1.0.5
Products.EasyAsPiIE = 0.92
Products.Gloworm = 1.0
Products.MasterSelectWidget = 0.4.4
Products.PDBDebugMode = 1.3.1
Products.PloneGetPaid = 0.10.4
Products.PressRoom = 3.13
Products.PythonField = 1.1.3
Products.RedirectionTool = 1.3
Products.Scrawl = 2.0b1
Products.TemplateFields = 1.2.5
Products.cron4plone = 1.1.5rc1
Products.salesforcebaseconnector = 1.4
Products.salesforcepfgadapter = 1.9.1
buildout.sanitycheck = 1.0b1
collective.plonetruegallery = 1.0
collective.recipe.bootstrap = 1.0
collective.recipe.filestorage = 0.6
collective.recipe.plonesite = 1.8.2
collective.salesforce.rsvp = 1.3
collective.sharerizer = 1.0
collective.uploadify = 1.0rc3
collective.weightedportlets = 1.1
ftw.calendar = 1.12
gdata = 2.0.17
getpaid.authorizedotnet = 0.6.5
getpaid.core = 0.9.2
getpaid.formgen = 0.4
p4a.calendar = 2.0a3
p4a.subtyper = 1.1.3
plone.behavior = 1.0.1
plone.directives.form = 1.0
plone.formwidget.autocomplete = 1.2.3
plone.formwidget.recaptcha = 1.0b3
plone.namedfile = 1.0.6
plone.rfc822 = 1.0
plone.schemaeditor = 1.2.0
recaptcha-client = 1.0.6
z3c.blobfile = 0.1.5
z3c.caching = 2.0a1
z3c.relationfield = 0.6.1
zc.authorizedotnet = 1.3.1
zc.relation = 1.0

# Required by:
# getpaid.authorizedotnet==0.6.5
M2Crypto = 0.21.1

# Required by:
# Products.salesforcepfgadapter==1.9.1
Products.TALESField = 1.1.3

collective.z3cform.datagridfield = 0.10

# Required by:
# plone.cachepurging==1.0b1
# plone.caching==1.0b1
five.globalrequest = 1.0

getpaid.nullpayment = 0.5.0

# Required by:
# Products.PloneGetPaid==0.10.4
getpaid.wizard = 0.4

# Required by:
# getpaid.core==0.9.2
hurry.workflow = 0.9.2-getpaid

# Required by:
# Products.PloneGetPaid==0.10.4
ore.viewlet = 0.2.2-getpaid

# Required by:
# p4a.subtyper==1.1.3
p4a.z2utils = 1.0.2

# Required by:
# plone.dexterity==1.1.2
plone.alterego = 1.0

plone.app.dexterity = 1.2.1

# Required by:
# plone.app.dexterity==1.2.1
plone.app.textfield = 1.2.1

# Required by:
# plone.app.dexterity==1.2.1
plone.directives.dexterity = 1.0.2

# Required by:
# plone.app.dexterity==1.2.1
plone.formwidget.namedfile = 1.0.2

# Required by:
# plone.dexterity==1.1.2
plone.synchronize = 1.0.1

# Required by:
# collective.z3cform.wizard==1.3.3
# plone.app.discussion==1.1
# plone.formwidget.recaptcha==1.0b3
plone.z3cform = 0.7.8

# Required by:
# plone.app.caching==1.0b1
python-dateutil = 2.2

# Required by:
# plone.dexterity==1.1.2
rwproperty = 1.0

# Required by:
# python-dateutil==2.2
six = 1.4.1

# Required by:
# Products.PloneGetPaid==0.10.4
yoma.batching = 0.2.2-getpaid

# Required by:
# plone.app.z3cform==0.5.7
z3c.formwidget.query = 0.9

# Required by:
# z3c.relationfield==0.6.1
z3c.objpath = 1.0

# Required by:
# plone.app.caching==1.0b1
z3c.zcmlhook = 1.0b1

# Required by:
# zc.authorizedotnet==1.3.1
zc.creditcard = 1.0

# Required by:
# zc.authorizedotnet==1.3.1
zc.ssl = 1.2

# Required by:
# five.globalrequest==1.0
zope.globalrequest = 1.0


Genshi = 0.7
Products.BeakerSessionDataManager = 1.1
collective.logbook = 0.6
collective.recipe.template = 1.10
z3c.offlinepack = 0.2
z3c.recipe.usercrontab = 1.1

# Required by:
# collective.beaker==1.0b3
Beaker = 1.6.4

# Required by:
# Products.BeakerSessionDataManager==1.1
collective.beaker = 1.0b3