Python lxml:未知includemode或@method属性

Python lxml:未知includemode或@method属性,python,plone,lxml,diazo,Python,Plone,Lxml,Diazo,我使用以下步骤在一个全新的Ubuntu 12.04LTS盒上进行了设置: apt获取更新 apt get install python setuptools apt-get-install-build-essential python2.7-dev libxslt1-dev easy_安装-U diazo 按照中的说明操作(添加最新版本) 快速入门中的重氮示例运行良好(在[filter:theme]中添加了read\u network=true) 但是,当我添加我的现有项目(在其他机器上工作)时

我使用以下步骤在一个全新的Ubuntu 12.04LTS盒上进行了设置:

  • apt获取更新
  • apt get install python setuptools
  • apt-get-install-build-essential python2.7-dev libxslt1-dev
  • easy_安装-U diazo
  • 按照中的说明操作(添加最新版本)
  • 快速入门中的重氮示例运行良好(在
    [filter:theme]
    中添加了
    read\u network=true

    但是,当我添加我的现有项目(在其他机器上工作)时,我在尝试查看站点时从
    bin/paster-service
    中得到以下错误

    Exception happened during processing of request from ('192.168.33.1', 50171)
    Traceback (most recent call last):
      File "/home/vagrant/test/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1068, in process_request_in_thread
        self.finish_request(request, client_address)
      File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
        self.handle()
      File "/home/vagrant/test/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 442, in handle
        BaseHTTPRequestHandler.handle(self)
      File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
        self.handle_one_request()
      File "/home/vagrant/test/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 437, in handle_one_request
        self.wsgi_execute()
      File "/home/vagrant/test/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 287, in wsgi_execute
        self.wsgi_start_response)
      File "/home/vagrant/test/eggs/Paste-1.7.5.1-py2.7.egg/paste/urlmap.py", line 203, in __call__
        return app(environ, start_response)
      File "/home/vagrant/test/eggs/diazo-1.0b1-py2.7.egg/diazo/wsgi.py", line 353, in __call__
        transform_middleware = self.get_transform_middleware()
      File "/home/vagrant/test/eggs/diazo-1.0b1-py2.7.egg/diazo/wsgi.py", line 342, in get_transform_middleware
        tree=self.compile_theme(),
      File "/home/vagrant/test/eggs/diazo-1.0b1-py2.7.egg/diazo/wsgi.py", line 337, in compile_theme
        xsl_params=xsl_params,
      File "/home/vagrant/test/eggs/diazo-1.0b1-py2.7.egg/diazo/compiler.py", line 106, in compile_theme
        read_network=read_network,
      File "/home/vagrant/test/eggs/diazo-1.0b1-py2.7.egg/diazo/rules.py", line 164, in process_rules
        rules_doc = annotate_rules(rules_doc)
      File "/home/vagrant/test/eggs/diazo-1.0b1-py2.7.egg/diazo/utils.py", line 49, in __call__
        result = self.xslt(*args, **kw)
      File "xslt.pxi", line 556, in lxml.etree.XSLT.__call__ (src/lxml/lxml.etree.c:110044)
    XSLTApplyError: 
                ERROR: Unknown includemode or @method attribute
    
    我尝试过设置中建议的不同的
    includemodes
    ,但没有成功

    除了我的扩展规则之外,我可以(目前)发现我的项目和演示之间唯一的区别是我包含了
    xmlns:xi=”http://www.w3.org/2001/XInclude“


    是什么导致了错误以及如何修复它?

    我在lxml上遇到了同样的问题。 尽量不要在xml文件中包含任何内容。 但是将代码直接写入文件中

    我还是不明白为什么会发生这种事


    希望它能给你一个线索。

    我也尝试过跳过easy_install步骤,在buildout中将lxml固定到2.3,但没有成功。我还尝试过在virtualenv中隔离buildout,但没有成功。