https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
Web browser: --- Bug ID: 56042 Summary: pagenotfound error while running replace,py with compat Product: Pywikibot Version: compat (1.0) Hardware: All OS: All Status: NEW Severity: major Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: basvb_wikipedia@live.nl Classification: Unclassified Mobile Platform: ---
When I'm running pywikibot with replace.py I do sometimes (like once every 6-7 pages replaced) get an error which stops the replace to run.
Traceback (most recent call last): File "replace.py", line 967, in <module> main() File "replace.py", line 956, in main bot.run() File "replace.py", line 542, in run page.put(new_text, self.editSummary) File "C:\compat\compat\wikipedia.py", line 2112, in put sysop = sysop, botflag=botflag, maxTries=maxTries) File "C:\compat\compat\wikipedia.py", line 2203, in _putPage response, data = query.GetData(params, self.site(), sysop=sysop, back_respon se = True) File "C:\compat\compat\pywikibot\support.py", line 121, in wrapper return method(*__args, **__kw) File "C:\compat\compat\query.py", line 135, in GetData res, jsontext = site.postForm(path, params, sysop, site.cookies(sysop = syso p) ) File "C:\compat\compat\wikipedia.py", line 6495, in postForm cookies=cookies) File "C:\compat\compat\wikipedia.py", line 6549, in postData raise PageNotFound(u'Page %s could not be retrieved. Check your family file ?' % url) pywikibot.exceptions.PageNotFound: Page https://commons.wikimedia.org/w/api.php could not be retrieved. Check your family file ?
The family is set as: family = 'commons' mylang = 'commons'
the command used is: python replace.py -namespace:6 -cat:RCE_suggested:_Centrum -summary:"Remove RCE-tag suggestion (this specific tag is not useful)" "{{RCE-subject|Centrum}}" ""
but the issue also occures on other commands and when entering a wrong password in the login.py (only at first attempt so far).
version information: Pywikibot: wikipedia.py (r-1 (unknown), ???????, 2013/10/23, 12:56:06, OUTDATED)
Release version: 1.0b1 Python: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] config-settings: use_api = True use_api_login = True unicode test: ok
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de
--- Comment #1 from xqt info@gno.de --- I noticed the command line in irc pastebin as
python replace.py -debug -lang:commons -family:commons -namespace:6 -cat:RCE_suggested:_Centrum -summary:"Remove RCE-tag suggestion (not useful)" -regex -dotall "({{RCE-subject|Centrum}})" ""
git wordt niet herkend als een interne of externe opdracht, programma of batchbestand.
Getting [[Category:RCE suggested: Centrum]] list... Getting 60 pages via API from commons:commons...
...
File:Overzicht - Amsterdam - 20408351 - RCE.jpg <<<
- {{RCE-subject|Centrum}}{{RCE-subject|Verdedigingswerk}} + {{RCE-subject|Verdedigingswerk}}
Updating page [[File:Overzicht - Amsterdam - 20408351 - RCE.jpg]] via API Traceback (most recent call last):
On the other hand, the bot worked: https://commons.wikimedia.org/w/index.php?title=File%3AOverzicht_hoekpartij_...
https://commons.wikimedia.org/w/index.php?title=File%3AOverzicht_-_Amsterdam...
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
--- Comment #2 from Basvb basvb_wikipedia@live.nl --- I tried it with multiple commands, and indeed most of the time 5 files or so get updated (up to 40 one time) and then the error occures.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |High
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- The error you describe is raised by the following code:
if e.code in [401, 404]: raise PageNotFound(u'Page %s could not be retrieved. Check ' u'your family file ?' % url)
which implies the server returned either HTTP/401 Unauthorized or HTTP/404 Not Found.
Unfortunately, I cannot reproduce it with the new to-be-removed tag basvb suggested on IRC...
In //gerrit.wikimedia.org/r/92075 , I have added debug output to show what the actual error is. Could you:
1) make a backup of wikipedia.py 2) download https://git.wikimedia.org/raw/pywikibot%2Fcompat/015e067e078bc7611f27c445075... and place it where the original one was 3) run again, with -debug 4) post the new debug response here?
Thanks!
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
--- Comment #4 from Merlijn van Deen valhallasw@arctus.nl --- The change has been merged, so instead of downloading the seperate file, you should now just download the latest nightly: http://tools.wmflabs.org/pywikibot/compat.zip
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |UNCONFIRMED Ever confirmed|1 |0
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
Ricordisamoa ricordisamoa@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricordisamoa@live.it
--- Comment #5 from Ricordisamoa ricordisamoa@live.it --- @Basvb, would you please follow the steps suggested by Merlijn? Thanks.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
Ricordisamoa ricordisamoa@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|pagenotfound error while |PageNotFound error while |running replace,py with |running replace.py with |compat |compat
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
--- Comment #8 from Basvb basvb_wikipedia@live.nl --- It seems to work now, I do not get the error anymore (changed around 100 pages now). Thanks for the help, and sorry for the delay.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56042
Andre Klapper aklapper@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME
--- Comment #9 from Andre Klapper aklapper@wikimedia.org --- (In reply to Basvb from comment #8)
It seems to work now
Closing as WORKSFORME then...
pywikipedia-bugs@lists.wikimedia.org