内容简介:翻译自:https://stackoverflow.com/questions/14358162/funnelweb-error-cannot-import-ordereddict
我正在尝试使用funnelweb附加组件从站点导入一些静态页面.这是我写的:bin / funnelweb –crawler:url = http://wiki.scandiatransplant.com –crawler:max = 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
OrderedDict是一个添加到 Python 2.7的新类,所以在你的情况下它是缺少的.
你可以安装 backport :
pip install ordereddict
或者将其添加为buildout中的依赖项,并编辑Plone / buildout-cache / eggs / transmogrify.webcrawler-1.2.1-py2.6.egg / transmogrify / webcrawler / webcrawler.py第21行以更改导入:
from collections import OrderedDict
至
try: from collections import OrderedDict except ImportError: # python 2.6 or earlier, use backport from ordereddict import OrderedDict
我已在 funnelweb issue tracker 中提交了一个问题,要求将其添加到该软件包的未来版本中,请参阅 issue 22 .
翻译自:https://stackoverflow.com/questions/14358162/funnelweb-error-cannot-import-ordereddict
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 消息队列为什么说它像漏斗?
- 令牌桶、漏斗、冷启动限流在 sentinel 的应用
- uCharts高性能跨端图表推新啦,新增图例点击、标记线、词云图、漏斗图等重磅功能
- ASP.NET Aries 高级开发教程:Excel导入之多表高级导入配置(中)
- 将Excel文件导入数据库(POI+Excel+MySQL+jsp页面导入)第一次优化
- [MySQL]备份和导入
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Beginning Apache Struts
Arnold Doray / Apress / 2006-02-20 / USD 44.99
Beginning Apache Struts will provide you a working knowledge of Apache Struts 1.2. This book is ideal for you Java programmers who have some JSP familiarity, but little or no prior experience with Ser......一起来看看 《Beginning Apache Struts》 这本书的介绍吧!