MisterSynergy created this task.
MisterSynergy added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
**Steps to replicate the issue** (include links if applicable):
- Use API via pywikibot in a way that requires continuation (via the continue
parameter)
- Example script:
import pywikibot as pwb
site = pwb.Site('wikidata', 'wikidata')
cat = pwb.Category(site, 'Wikidata status updates')
payload = list(cat.articles(namespaces=4, sortby='timestamp', reverse=True))
**What happens?**:
pywikibot.exceptions.APIError is raised
WARNING: API error badcontinue: Invalid continue param. You should pass the
original value returned by the previous query.
Traceback (most recent call last):
File "/home/msyn/pywikibot_scripts/../pywikibot/pwb.py", line 39, in
<module>
sys.exit(main())
File "/home/msyn/pywikibot_scripts/../pywikibot/pwb.py", line 35, in main
runpy.run_path(str(path), run_name='__main__')
File "/usr/lib/python3.9/runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "/usr/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File
"/home/msyn/pywikibot_scripts/../pywikibot/pywikibot/scripts/wrapper.py", line
516, in <module>
main()
File
"/home/msyn/pywikibot_scripts/../pywikibot/pywikibot/scripts/wrapper.py", line
500, in main
if not execute():
File
"/home/msyn/pywikibot_scripts/../pywikibot/pywikibot/scripts/wrapper.py", line
487, in execute
run_python_file(filename, script_args, module)
File
"/home/msyn/pywikibot_scripts/../pywikibot/pywikibot/scripts/wrapper.py", line
147, in run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File "test.py", line 15, in <module>
main()
File "test.py", line 9, in main
ps = list(cat.articles(namespaces=4, sortby='timestamp', reverse=True))
File "/home/msyn/pywikibot/pywikibot/page/_category.py", line 183, in
members
for member in self.site.categorymembers(self, total=total, **kwargs):
File "/usr/lib/python3.9/_collections_abc.py", line 330, in __next__
return self.send(None)
File "/home/msyn/pywikibot/pywikibot/tools/collections.py", line 275, in
send
return next(self._started_gen)
File "/home/msyn/pywikibot/pywikibot/data/api/_generators.py", line 610,
in generator
self.data = self.request.submit()
File "/home/msyn/pywikibot/pywikibot/data/api/_requests.py", line 1088,
in submit
raise pywikibot.exceptions.APIError(**error)
pywikibot.exceptions.APIError: badcontinue: Invalid continue param. You
should pass the original value returned by the previous query.
[servedby: mw1421;
help: See https://www.wikidata.org/w/api.php for API usage. Subscribe to
the mediawiki-api-announce mailing list at
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
for notice of API deprecations and breaking changes.]
CRITICAL: Exiting due to uncaught exception <class
'pywikibot.exceptions.APIError'>
**What should have happened instead?**:
- API interaction should not result in an error
**Software version** (skip for WMF-hosted wikis like Wikipedia):
- Using pywikibot revision af8d9fe98
<https://github.com/wikimedia/pywikibot/commit/af8d9fe98a96cbb52e1cb8a8ce62f92b12a54d68>
from yesterday evening
**Other information** (browser name/version, screenshots, etc.):
- Check whether this is related to
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/851144/ from T321265
<https://phabricator.wikimedia.org/T321265> since the API now requires a valid
timestamp to be handed over, rather than just a string which may or may not be
a valid timestamp.
TASK DETAIL
https://phabricator.wikimedia.org/T323910
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: MisterSynergy
Cc: Aklapper, pywikibot-bugs-list, MisterSynergy, PotsdamLamb, Jyoo1011,
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS,
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb,
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]