jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
TASK DESCRIPTION
abusefilter errors and warnings during page save should be detected, reported nicely to the user, and possibly allow re-try if the abusefilter allows that.
Also, IIRC, we may need to back off if we are hitting abusefilters many times, to prevent it triggering a block action.
TASK DETAIL
https://phabricator.wikimedia.org/T85656
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
JAnD created this task.
JAnD added a subscriber: JAnD.
JAnD added projects: Pywikibot-category.py, pywikibot-core.
TASK DESCRIPTION
I wanted to move some categories to another subcategory.
1) bot crashes
2) bot ignores namespace parameter
```
I:\py\rewrite>pwb.py category tidy -namespace:14
Which category do you want to tidy up? mosty
Retrieving 21 pages from wikipedia:cs.
===================================================================
Treating page Most, currently in Kategorie:Mosty
{{Různé významy|tento=druhu stavby}}
{{Neověřeno}}
[[Soubor:Akashi-kaikyo bridge3.jpg|thumb|300px|[[Most Akaši-Kaikjó]] v [[Japonsk
o|Japonsku]], [[Seznam nejdelších visutých mostů|nejdelší visutý most na světě]]
]]
'''Most''' je dopravní [[stavba]], která převádí pěší, silniční nebo železniční
cestu případně vodní tok, přes překážku, kterou může být například vodní plocha
([[řeka]], [[potok]], [[moře]], [[jezero]]), terénní nerovnost ([[údolí (geomorf
ologie)|údolí]], rokle, strž) nebo jiná komunikace.
Traceback (most recent call last):
File "I:\py\rewrite\pwb.py", line 222, in <module>
run_python_file(filename, argv, argvu, file_package)
File "I:\py\rewrite\pwb.py", line 81, in run_python_file
main_mod.__dict__)
File ".\scripts\category.py", line 1231, in <module>
main()
File ".\scripts\category.py", line 1220, in main
bot.run()
File ".\scripts\category.py", line 936, in run
self.move_to_category(article, cat, cat)
File ".\scripts\category.py", line 850, in move_to_category
subcatlist = list(self.catDB.getSubcats(current_cat))
File ".\scripts\category.py", line 194, in getSubcats
self._load()
File ".\scripts\category.py", line 167, in _load
if not self.is_loaded():
TypeError: 'bool' object is not callable
<type 'exceptions.TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
I:\py\rewrite>
```
TASK DETAIL
https://phabricator.wikimedia.org/T86351
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: JAnD
Cc: Aklapper, JAnD, jayvdb, pywikipedia-bugs
valhallasw created this task.
valhallasw added a subscriber: valhallasw.
valhallasw added a project: pywikibot-core.
TASK DESCRIPTION
I think we can safely remove some questions:
* Your default user directory is "/home/valhallasw/src/pywikibot-core"
Do you want to use that directory? ([y]es, [N]o)
(assume 'yes')
* Do you want to copy user files from an existing Pywikibot installation? ([y]es, [n]o)
(assume 'no', if the user wants to do so, they can do so manually)
* Create user-config.py file? Required for running bots. ([y]es, [N]o)
(assume 'yes', because otherwise these questions are useless)
* Would you like the extended version of user-config.py, with explanations included? ([y]es, [n]o)
(assume 'yes'; I see no reason not to create the extended version)
* Create user-fixes.py file? Optional and for advanced users. ([y]es, [N]o)
(assume 'yes')
This reduces the script to three questions:
1. what family
2. what lang
3. what username
TASK DETAIL
https://phabricator.wikimedia.org/T85270
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw
Cc: Aklapper, valhallasw, jayvdb, pywikipedia-bugs
Qgil created this task.
Qgil added a subscriber: Qgil.
Qgil added projects: Project-Creators, dev.wikimedia.org, Engineering-Community, MediaWiki-Documentation, Pywikibot-documentation.
TASK DESCRIPTION
* Project name: Documentation
* Description: A tag to identify tasks requiring technical documentation. See also [[ https://www.mediawiki.org/wiki/Documentation | mw:Documentation ]].
* Type: Tag
* Policy: Default
The tracking bug {T2001} has been the way to collect bugs related with technical documentation. Now that a technical writer is about to join the #Engineering-Community team (T565), it is a good time to add a bit more of sophistication for better planning.
Note also that #mediawiki-documentation and #pywikibot-documentation (a tag?) exist as well.
Then there is #dev.wikimedia.org, but this is a documentation project on its own.
TASK DETAIL
https://phabricator.wikimedia.org/T85485
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Qgil
Cc: Aklapper, Qgil, Gryllida, Jdforrester-WMF, Rfarrand, pywikipedia-bugs
Sitic created this task.
Sitic added a subscriber: Sitic.
Sitic added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
I'm maintaining a continuous running script, which resets the sandbox on dewiki (the sandbox on dewiki is a bit different to the ones on e.g. enwiki, it's a specialized script, not the reset_sandbox one).
It's been running without problems for several months, but suddenly since 12. February I only get "badtoken: Invalid token" exceptions when trying to save a page. When restarting it runs fine for a while, and then only gets "badtoken: Invalid token" on page.save.
Here is an example from the log
```
2015-02-17 10:43:39 Rahu.py, 182 in reset_sandbox: INFO {lightyellow}17. February 2015, 10:43:39: Reseting Sandbox ...{default}
2015-02-17 10:43:39 login.py, 205 in login: INFO Logging in to wikipedia:de as AsuraBot
2015-02-17 10:43:40 login.py, 223 in login: VERBOSE Should be logged in now
2015-02-17 10:43:40 throttle.py, 247 in wait: INFO Sleeping for 7.0 seconds, 2015-02-17 10:43:40
2015-02-17 10:43:48 api.py, 1314 in submit: VERBOSE API Error: query=
{'action': [u'edit'],
'assert': [u'user'],
'basetimestamp': [Timestamp(2015, 2, 17, 9, 22, 18)],
'bot': [True],
'createonly': [False],
'format': ['json'],
'maxlag': ['5'],
'minor': [False],
'nocreate': [False],
'notminor': [False],
'recreate': [True],
'summary': [u'[[WP:Bots', u'Bot]]: Spielwiese gem\xe4ht (zur\xfcckgesetzt)'],
'text': [u'{{Bitte erst NACH dieser Zeile schreiben! (Begr\xfc\xdfungskasten)}}\n{{subst:Vorlage:Bitte erst NACH dieser Zeile schreiben! (Begr\xfc\xdfungskasten)/Text}}'],
'title': [u'Wikipedia:Spielwiese'],
'token': [u'6c367b3d3ec08fed211b51859359f8d054e263f0+\\']}
2015-02-17 10:43:48 api.py, 1316 in submit: VERBOSE response=
{u'servedby': u'mw1190', u'error': {'help': u'See https://de.wikipedia.org/w/api.php for API usage'}}
2015-02-17 10:43:48 page.py, 1056 in _save: VERBOSE Error saving page [[Wikipedia:Spielwiese]] (badtoken: Invalid token)
Traceback (most recent call last):
File "/shared/pywikipedia/core/pywikibot/page.py", line 1047, in _save
watch=watchval, bot=botflag, **kwargs)
File "/shared/pywikipedia/core/pywikibot/site.py", line 1041, in callee
return fn(self, *args, **kwargs)
File "/shared/pywikipedia/core/pywikibot/site.py", line 4048, in editpage
result = req.submit()
File "/shared/pywikipedia/core/pywikibot/data/api.py", line 1318, in submit
raise APIError(code, info, **result["error"])
APIError: badtoken: Invalid token
2015-02-17 10:43:48 Rahu.py, 195 in reset_sandbox: INFO {lightyellow}Edit to page [[Wikipedia:Spielwiese]] failed:
badtoken: Invalid token while reseting!{default}
2015-02-17 10:43:49 Rahu.py, 182 in reset_sandbox: INFO {lightyellow}17. February 2015, 10:43:49: Reseting Sandbox ...{default}
2015-02-17 10:43:49 login.py, 205 in login: INFO Logging in to wikipedia:de as AsuraBot
2015-02-17 10:43:50 login.py, 223 in login: VERBOSE Should be logged in now
2015-02-17 10:43:50 throttle.py, 247 in wait: INFO Sleeping for 7.5 seconds, 2015-02-17 10:43:50
2015-02-17 10:43:58 api.py, 1314 in submit: VERBOSE API Error: query=
{'action': [u'edit'],
'assert': [u'user'],
'basetimestamp': [Timestamp(2015, 2, 17, 9, 22, 18)],
'bot': [True],
'createonly': [False],
'format': ['json'],
'maxlag': ['5'],
'minor': [False],
'nocreate': [False],
'notminor': [False],
'recreate': [True],
'summary': [u'[[WP:Bots', u'Bot]]: Spielwiese gem\xe4ht (zur\xfcckgesetzt)'],
'text': [u'{{Bitte erst NACH dieser Zeile schreiben! (Begr\xfc\xdfungskasten)}}\n{{subst:Vorlage:Bitte erst NACH dieser Zeile schreiben! (Begr\xfc\xdfungskasten)/Text}}'],
'title': [u'Wikipedia:Spielwiese'],
'token': [u'6c367b3d3ec08fed211b51859359f8d054e263f0+\\']}
2015-02-17 10:43:58 api.py, 1316 in submit: VERBOSE response=
{u'servedby': u'mw1139', u'error': {'help': u'See https://de.wikipedia.org/w/api.php for API usage'}}
2015-02-17 10:43:58 page.py, 1056 in _save: VERBOSE Error saving page [[Wikipedia:Spielwiese]] (badtoken: Invalid token)
Traceback (most recent call last):
File "/shared/pywikipedia/core/pywikibot/page.py", line 1047, in _save
watch=watchval, bot=botflag, **kwargs)
File "/shared/pywikipedia/core/pywikibot/site.py", line 1041, in callee
return fn(self, *args, **kwargs)
File "/shared/pywikipedia/core/pywikibot/site.py", line 4048, in editpage
result = req.submit()
File "/shared/pywikipedia/core/pywikibot/data/api.py", line 1318, in submit
raise APIError(code, info, **result["error"])
APIError: badtoken: Invalid token
2015-02-17 10:43:58 Rahu.py, 195 in reset_sandbox: INFO {lightyellow}Edit to page [[Wikipedia:Spielwiese]] failed:
badtoken: Invalid token while reseting!{default}
2015-02-17 10:44:01 Rahu.py, 182 in reset_sandbox: INFO {lightyellow}17. February 2015, 10:44:01: Reseting Sandbox ...{default}
2015-02-17 10:44:01 login.py, 205 in login: INFO Logging in to wikipedia:de as AsuraBot
2015-02-17 10:44:02 login.py, 223 in login: VERBOSE Should be logged in now
2015-02-17 10:44:03 throttle.py, 247 in wait: INFO Sleeping for 4.9 seconds, 2015-02-17 10:44:03
2015-02-17 10:44:08 api.py, 1314 in submit: VERBOSE API Error: query=
{'action': [u'edit'],
'assert': [u'user'],
'basetimestamp': [Timestamp(2015, 2, 17, 9, 22, 18)],
'bot': [True],
'createonly': [False],
'format': ['json'],
'maxlag': ['5'],
'minor': [False],
'nocreate': [False],
'notminor': [False],
'recreate': [True],
'summary': [u'[[WP:Bots', u'Bot]]: Spielwiese gem\xe4ht (zur\xfcckgesetzt)'],
'text': [u'{{Bitte erst NACH dieser Zeile schreiben! (Begr\xfc\xdfungskasten)}}\n{{subst:Vorlage:Bitte erst NACH dieser Zeile schreiben! (Begr\xfc\xdfungskasten)/Text}}'],
'title': [u'Wikipedia:Spielwiese'],
'token': [u'6c367b3d3ec08fed211b51859359f8d054e263f0+\\']}
2015-02-17 10:44:08 api.py, 1316 in submit: VERBOSE response=
{u'servedby': u'mw1228', u'error': {'help': u'See https://de.wikipedia.org/w/api.php for API usage'}}
2015-02-17 10:44:08 page.py, 1056 in _save: VERBOSE Error saving page [[Wikipedia:Spielwiese]] (badtoken: Invalid token)
Traceback (most recent call last):
File "/shared/pywikipedia/core/pywikibot/page.py", line 1047, in _save
watch=watchval, bot=botflag, **kwargs)
File "/shared/pywikipedia/core/pywikibot/site.py", line 1041, in callee
return fn(self, *args, **kwargs)
File "/shared/pywikipedia/core/pywikibot/site.py", line 4048, in editpage
result = req.submit()
File "/shared/pywikipedia/core/pywikibot/data/api.py", line 1318, in submit
raise APIError(code, info, **result["error"])
APIError: badtoken: Invalid token
```
Why is the token always the same? The relevant part of the script:
```
def reset_sandbox()
site = pywikibot.Site()
site.login()
sandboxPage = pywikibot.Page(site, sandboxTitle)
sandboxPage.get(force=True, get_redirect=True)
sandboxPage.text = sandboxDefault
sandboxPage.save(comment=comment, botflag=botflag, minor=False)
```
I previously used a shared site object, which causes the same errors.
TASK DETAIL
https://phabricator.wikimedia.org/T89702
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Sitic
Cc: pywikipedia-bugs, Aklapper, Sitic, jayvdb
JAnD added a subscriber: JAnD.
JAnD added a comment.
This behavior should be optional - for cs.wiki I want to remove "useless" spaces
TASK DETAIL
https://phabricator.wikimedia.org/T63024
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, JAnD
Cc: JAnD, Xqt, jayvdb, XZise, Anshoe, pywikipedia-bugs