[Pywikipedia-l] [ pywikipediabot-Bugs-2091292 ] interwiki.py NameError
SourceForge.net
noreply at sourceforge.net
Wed Nov 19 12:01:51 UTC 2008
Bugs item #2091292, was opened at 2008-09-03 16:58
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2091292&group_id=93107
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: shizhao (wikishizhao)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py NameError
Initial Comment:
run interwiki.py can't changing page:
======Post-processing [[zh:中国共产党领导人世代]]======
Updating links on page [[zh:中国共产党领导人世代]].
Changes to be made: 移除: [[ja:第四世代]]
- [[ja:第四世代]]
ERROR: Found incorrect link to ja in [[zh:中国共产党领导人世代]]
NOTE: Updating live wiki...
Changing page [[zh:中国共产党领导人世代]]
Dump zh (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1735, in <module>
bot.run()
File "interwiki.py", line 1486, in run
self.queryStep()
File "interwiki.py", line 1465, in queryStep
subj.finish(self)
File "interwiki.py", line 1053, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1204, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "/home/shizhao/pywikipedia/wikipedia.py", line 1300, in put
newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "/home/shizhao/pywikipedia/wikipedia.py", line 1386, in _putPage
response, data = self.site().postForm(address, predata, sysop)
File "/home/shizhao/pywikipedia/wikipedia.py", line 4326, in postForm
cookies=self.cookies(sysop = sysop))
File "/home/shizhao/pywikipedia/wikipedia.py", line 4377, in postData
return self.postData(address, data, contentType, sysop, useCookie, compress, cookie)
NameError: global name 'useCookie' is not defined
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-11-19 13:01
Message:
true silvonen, we can. Fix applied in r6107, thanks for letting us know !
By the way shizao, considering the line number mismatch, you seem to be
running some quite old code =)
----------------------------------------------------------------------
Comment By: Mikko Silvonen (silvonen)
Date: 2008-11-18 20:18
Message:
I don't understand the logic of the code, but can we simply remove the
useCookie parameter from the following line of code? The postData method
seems to be calling itself with too many parameters.
return self.postData(address, data, contentType, sysop, useCookie,
compress, cookie)
----------------------------------------------------------------------
Comment By: Mikko Silvonen (silvonen)
Date: 2008-11-18 20:05
Message:
I still got this error with r6103 (see 2310437 for details), and in my case
the bot did not continue.
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2008-09-16 15:53
Message:
I also had this message sometimes but not a fatal error (i.e., the bot
displayed the message but continued processing).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2091292&group_id=93107
More information about the Pywikipedia-l
mailing list