Funnelweb d'erreur, impossible d'importer OrderedDict
Je suis en train d'importer des pages statiques à partir d'un site à l'aide de funnelweb add-on pour plone. Voici ce que j'écris: bin/funnelweb --crawler:url=http://wiki.scandiatransplant.com --crawler:max=50 --ploneupload=http://admin:admin@localhost:8080/TestPage
.
Je reçois ce message d'erreur:
ImportError: cannot import name OrderedDict
Le plein de sperme est ajouté au-dessous. Quelqu'un sait-il comment résoudre ce problème?
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
OriginalL'auteur user1960836 | 2013-01-16
Vous devez vous connecter pour publier un commentaire.
OrderedDict
est une nouvelle classe ajoutée à Python 2.7, de sorte qu'il est manquant dans votre cas.Vous pouvez installer un backport:
ou d'ajouter que comme une dépendance dans le buildout, et de modifier
Plone/buildout-cache/eggs/transmogrify.webcrawler-1.2.1-py2.6.egg/transmogrify/webcrawler/webcrawler.py
ligne 21 pour modifier l'importation à partir de:à
J'ai déposé un problème dans le funnelweb issue tracker de demander que ce qui est ajouté à une future version de l'emballage, voir question 22.
Les versions antérieures de Plone ne prennent pas en charge Python 2.7 (officiellement, il sera probablement exécuter), alors vous êtes probablement en cours d'exécution avec Python 2.6 ou version antérieure. Vous devez installer le
ordereddict
paquet puis, dans la bonne installation de Python. Siimport ordereddict
échoue dans votre invite python (et assurez-vous que vous êtes certain à 100% que vous avez la droit python, celui qui exécute votre serveur Plone), alors vous ne l'avez pas installé au bon endroit.En fait, voici quelques-uns des stacktrace: à partir de collections d'importation OrderedDict zope.la configuration.xmlconfig.ZopeXMLConfigurationError: le Fichier "/usr/local/Plone/buildout-cache/oeufs/mr.migrator-1.0.1-py2.6.oeuf/mr/migrator/autoinclude.zcml", ligne 10.4-10.85 ZopeXMLConfigurationError: Fichier "/usr/local/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.6.egg/transmogrify/ploneremote/configure.zcml"ligne de 24,4 atteint 25,67 ImportError: impossible d'importer nom OrderedDict
Ok, cela pourrait être le cas. Je vais essayer ça, merci
Bon, je remarque que c'est à l'aide de python 2.6. Je ne suis pas vraiment sûr de savoir comment le modifier afin qu'il utilise la version 2.7 de python?
OriginalL'auteur Martijn Pieters