Plone 漏斗网错误,无法导入OrderedDict

Plone 漏斗网错误,无法导入OrderedDict,plone,ordereddictionary,plone-funnelweb,Plone,Ordereddictionary,Plone Funnelweb,我正在尝试使用plone的漏斗网插件从站点导入一些静态页面。下面是我写的:bin/funnelweb——爬虫:url=http://wiki.scandiatransplant.com --爬虫:最大值=50--ploneupload=http://admin:admin@localhost:8080/TestPage 我得到这个错误: ImportError: cannot import name OrderedDict 下面添加了完整的回溯。有人知道如何解决这个问题吗 Traceback

我正在尝试使用plone的漏斗网插件从站点导入一些静态页面。下面是我写的:
bin/funnelweb——爬虫:url=http://wiki.scandiatransplant.com --爬虫:最大值=50--ploneupload=http://admin:admin@localhost:8080/TestPage

我得到这个错误:

ImportError: cannot import name OrderedDict
下面添加了完整的回溯。有人知道如何解决这个问题吗

Traceback (most recent call last):
  File "bin/funnelweb", line 116, in <module>
    mr.migrator.runner.runner({},"funnelweb.remote")
  File "/home/magiq/Plone/buildout-cache/eggs/mr.migrator-1.0.1-py2.6.egg/mr/migrator/runner/__init__.py", line 69, in runner
    load_config('autoinclude.zcml', mr.migrator)
  File "/home/magiq/Plone/buildout-cache/eggs/Zope2-2.13.12-py2.6.egg/Zope2/App/zcml.py", line 55, in load_config
    _context = xmlconfig.file(config, package, _context, execute=execute)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 649, in file
    include(context, name, package)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
  File "/home/magiq/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.4-py2.6.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
    includeZCMLGroup(_context, info, filename)
  File "/home/magiq/Plone/buildout-cache/eggs/z3c.autoinclude-0.3.4-py2.6.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
    include(_context, filename, includable_package)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py", line 705, in finish
    args = toargs(context, *self.argdata)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py", line 1397, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/fields.py", line 137, in fromUnicode
    value = self.context.resolve(name)
  File "/home/magiq/Plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py", line 179, in resolve
    mod = __import__(mname, *_import_chickens)
  File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.webcrawler-1.2.1-py2.6.egg/transmogrify/webcrawler/webcrawler.py", line 21, in <module>
    from collections import OrderedDict
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/magiq/Plone/buildout-cache/eggs/mr.migrator-1.0.1-py2.6.egg/mr/migrator/autoinclude.zcml", line 10.4-10.85
    ZopeXMLConfigurationError: File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.webcrawler-1.2.1-py2.6.egg/transmogrify/webcrawler/configure.zcml", line 9.4-10.46
    ImportError: cannot import name OrderedDict
回溯(最近一次呼叫最后一次):
文件“bin/funnelweb”,第116行,在
migrator.runner.runner先生({},“漏斗网远程”)
文件“/home/magiq/Plone/buildout cache/eggs/mr.migrator-1.0.1-py2.6.egg/mr/migrator/runner/_init__uuuuuuu.py”,第69行,在runner中
加载配置('autoinclude.zcml',mr.migrator)
文件“/home/magiq/Plone/buildout cache/eggs/Zope2-2.13.12-py2.6.egg/Zope2/App/zcml.py”,第55行,加载配置
_context=xmlconfig.file(配置,包,_context,execute=execute)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第649行,在文件中
包括(上下文、名称、包)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第548行,包含在include中
processxmlfile(f,上下文)
processxmlfile中的文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第380行
parser.parse(src)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py”,第107行,在parse中
IncrementalParser.parse(self,source)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py”,第123行,在parse中
自进给(缓冲区)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py”,第207行,在提要中
self.\u parser.Parse(数据,isFinal)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py”,第349行,在元素末尾
self.\u cont\u handler.endelements(成对,无)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第359行,在Endelements中
self.context.end()
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py”,最后第558行
self.stack.pop().finish()
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py”,第706行,完成
actions=self.handler(上下文,**参数)
includePlugins指令第104行的文件“/home/magiq/Plone/buildout cache/eggs/z3c.autoinclude-0.3.4-py2.6.egg/z3c/autoinclude/zcml.py”
IncludeDCMLGroup(_上下文、信息、文件名)
文件“/home/magiq/Plone/buildout cache/eggs/z3c.autoinclude-0.3.4-py2.6.egg/z3c/autoinclude/zcml.py”,includeZCMLGroup中第30行
包含(_上下文、文件名、可包含的_包)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第548行,包含在include中
processxmlfile(f,上下文)
processxmlfile中的文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第380行
parser.parse(src)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py”,第107行,在parse中
IncrementalParser.parse(self,source)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/xmlreader.py”,第123行,在parse中
自进给(缓冲区)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py”,第207行,在提要中
self.\u parser.Parse(数据,isFinal)
文件“/home/magiq/Plone/Python-2.6/lib/python2.6/xml/sax/expatreader.py”,第349行,在元素末尾
self.\u cont\u handler.endelements(成对,无)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/xmlconfig.py”,第359行,在Endelements中
self.context.end()
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py”,最后第558行
self.stack.pop().finish()
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py”,第705行,完成
args=toargs(上下文,*self.argdata)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py”,第1397行,格式为torgs
args[str(name)]=字段
Unicode格式的文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/fields.py”,第137行
value=self.context.resolve(名称)
文件“/home/magiq/Plone/buildout cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py”,第179行,在“解析”中
mod=uuu导入_uuu(mname,*u导入_u鸡)
文件“/home/magiq/Plone/buildout cache/eggs/transmogrify.webcrawler-1.2.1-py2.6.egg/transmogrify/webcrawler/webcrawler.py”,第21行,在
从集合导入订单
zope.configuration.xmlconfig.ZopeXMLConfigurationError:File“/home/magiq/Plone/buildout cache/eggs/mr.migrator-1.0.1-py2.6.egg/mr/migrator/autoinclude.zcml”,第10.4-10.85行
ZopeXMLConfigurationError:File“/home/magiq/Plone/buildout cache/eggs/transmogrify.webcrawler-1.2.1-py2.6.egg/transmogrify/webcrawler/configure.zcml”,第9.4-10.46行
ImportError:无法导入名称OrderedDict

OrderedDict
是添加到Python 2.7中的一个新类,因此在您的示例中缺少它

您可以安装:

或者将其作为依赖项添加到构建中,然后编辑
Plone/buildout cache/eggs/transmogrify.webcrawler-1.2.1-py2.6.egg/transmogrify/webcrawler/webcrawler.py
第21行以更改导入:

from collections import OrderedDict


我在中提交了一个问题,请求将其添加到该软件包的未来版本中,请参阅。

我已在第三台计算机上安装了漏斗网,并且收到无法导入OrderedICT的消息时遇到问题。我已经按照这里的建议做了(这在前面的两台机器上对我有效),但是在第三台机器上,它
from collections import OrderedDict
try:
    from collections import OrderedDict
except ImportError:
    # python 2.6 or earlier, use backport
    from ordereddict import OrderedDict