2013-01-17 23 views
1

我試圖進口一些網頁做這樣的:Funnelweb類型錯誤進口

bin/funnelweb --crawler:url=http://wiki.scandiatransplant.org --crawler:max=50 --ploneupload=http://admin:localhost:8080/Plone 

但我收到此錯誤消息:如果不是我這樣做

Usage: funnelweb [options] 

funnelweb: error: ambiguous option: --ploneupload (--ploneupload:debug, --ploneupload:target?) 

: (但是,如果這個工作,將導入的頁面放置在哪裏?)

bin/funnelweb --crawler:url=http://wiki.scandiatransplant.org --crawler:max=150 

它的工作原理,就好像它是導入,但在最後我得到回溯如下。在底部它說:TypeError: replace() takes exactly 7 arguments (6 given)

這是創造者的錯誤,還是我給的論據不足? 我用這個網站的教程:http://plone.org/products/funnelweb

INFO:typeguess:Document, text/html: 144 
INFO:typeguess:Image, image/jpeg: 1 
INFO:typeguess:Link, : 1 
INFO:template1:extracted 0/144/151 
INFO:template2:extracted 0/144/151 
INFO:template3:extracted 0/144/151 
INFO:template4:extracted 0/144/151 
INFO:sitemapper:moved 0/151 from 0 sitemaps 
INFO:indexguess:2 folders added. 0 defaultpages set, 149 items sorted 
INFO:titleguess:0 folders added. 0 defaultpages set, 149 items sorted 
INFO:titleguess:titles=0/148 (id=0,backlinks=0,parent=0) 
INFO:attachmentguess:moved 0/154 
INFO:urltidy:titles=0, normed=147, total=154 
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.7.egg/mr/migrator/runner/__init__.py", line 132, in runner 
    transmogrifier(pipelineid, **overrides) 
    File "/home/magiq/Plone/buildout-cache/eggs/collective.transmogrifier-1.3-py2.7.egg/collective/transmogrifier/transmogrifier.py", line 62, in __call__ 
    for item in pipeline: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.7.egg/transmogrify/ploneremote/remoteprune.py", line 116, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.7.egg/transmogrify/ploneremote/remoteredirector.py", line 25, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.7.egg/transmogrify/ploneremote/remoteworkflowupdater.py", line 41, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/collective.transmogrifier-1.3-py2.7.egg/collective/transmogrifier/sections/inserter.py", line 19, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.7.egg/transmogrify/ploneremote/remotenavigationexcluder.py", line 32, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.7.egg/transmogrify/ploneremote/remoteschemaupdater.py", line 42, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.ploneremote-1.3-py2.7.egg/transmogrify/ploneremote/remoteconstructor.py", line 53, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.siteanalyser-1.3-py2.7.egg/transmogrify/siteanalyser/treeserializer.py", line 51, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/collective.transmogrifier-1.3-py2.7.egg/collective/transmogrifier/sections/inserter.py", line 19, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.siteanalyser-1.3-py2.7.egg/transmogrify/siteanalyser/treeserializer.py", line 51, in __iter__ 
    for item in self.previous: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.siteanalyser-1.3-py2.7.egg/transmogrify/siteanalyser/urltidy.py", line 83, in __iter__ 
    for item in self.relinker: 
    File "/home/magiq/Plone/buildout-cache/eggs/transmogrify.siteanalyser-1.3-py2.7.egg/transmogrify/siteanalyser/relinker.py", line 155, in __iter__ 
    item['remoteUrl'] = "./" + replace(link, item, changes, counter, self.missing, bad) 
TypeError: replace() takes exactly 7 arguments (6 given) 
+0

請不要嘗試和思考更好的問題頭銜:-) –

回答

1

你遇到了一個錯誤,是的。我已將此作爲transmogrify.siteanalyser issue tracker中的問題提交,請參閱issue #3

replace()方法是given an extra parameter,但線路155上的呼叫從未更新以提供該額外參數。

您應該能夠從編輯文件Plone/buildout-cache/eggs/transmogrify.siteanalyser-1.3-py2.7.egg/transmogrify/siteanalyser/relinker.py和變線155本自己解決:

item['remoteUrl'] = "./" + replace(link, item, changes, counter, self.missing, bad) 

item['remoteUrl'] = "./" + replace(link, item, changes, counter, self.missing, bad, self.broken_link_normalise)