JJMC89 added a comment.

Please try https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/395154/, I think I fixed also this error there.

I still get the exception. (Python 3.6.3)

>>> import pywikibot
>>> pywikibot.Page(pywikibot.Site('en', 'wikipedia'), '\x85')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "F:\Code\Wikimedia Gerrit\pywikibot\pywikibot\page.py", line 395, in __repr__
    title = repr(self.title())
  File "F:\Code\Wikimedia Gerrit\pywikibot\pywikibot\tools\__init__.py", line 1446, in wrapper
    return obj(*__args, **__kw)
  File "F:\Code\Wikimedia Gerrit\pywikibot\pywikibot\page.py", line 325, in title
    title = self._link.canonical_title()
  File "F:\Code\Wikimedia Gerrit\pywikibot\pywikibot\page.py", line 5731, in canonical_title
    if self.namespace != Namespace.MAIN:
  File "F:\Code\Wikimedia Gerrit\pywikibot\pywikibot\page.py", line 5692, in namespace
    self.parse()
  File "F:\Code\Wikimedia Gerrit\pywikibot\pywikibot\page.py", line 5634, in parse
    .format(self._text))
pywikibot.exceptions.InvalidTitle:  does not contain a page title.



You neither can link to the the redirect from redirect target nor from special page. The only reachable view is to edit the page [1]. I am wondering why mw accepts this as a page title; very strange!

I linked to the title here. You can view the redirect page here.


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

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

To: JJMC89
Cc: Dvorapa, zhuyifei1999, 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