JJMC89 added a comment.

Changing the loop to the below tells me the first problematic pageid is 28644448, which is the character \x85.

>>> for each_article in cat.articles(namespaces=(0)):
...     try:
...         print(each_article.title(withNamespace=True), each_article.pageid)
...     except pywikibot.exceptions.InvalidTitle:
...         print(each_article.pageid)
...         raise
...

str.strip() removes this character resulting an empty string, so the exception is raised. (page.py#L5666-L5670)

Since \x85 is a valid MediaWiki page title, pywikibot should also accept it as valid.


TASK DETAIL
https://phabricator.wikimedia.org/T197642

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: JJMC89
Cc: Aklapper, pywikibot-bugs-list, Xqt, JJMC89, APerson, Magul, Tbscho, MayS, Mdupont, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to