Code snippet to reproduce
def repro_ipv6_crash() -> None:
user = pywikibot.User(pywikibot.Site(), '2409:40f3:2b:72d:8000::')
page_usertalk = user.getUserTalkPage()
print(page_usertalk.isRedirectPage())Steps to replicate the issue (include links if applicable):
- Run the above code snippet with a bot setup for English Wikipedia
What happens?: Crash
Traceback (most recent call last):
File "scratch.py", line 40, in main
repro_ipv6_crash()
File "scratch.py", line 36, in repro_ipv6_crash
print(page_usertalk.isRedirectPage())
File "D:\Python\Pywikibot\2022-07-22-core_stable\core_stable\pywikibot\page\_pages.py", line 745, in isRedirectPage
return self.site.page_isredirect(self)
File "D:\Python\Pywikibot\2022-07-22-core_stable\core_stable\pywikibot\site\_apisite.py", line 1362, in page_isredirect
self.loadpageinfo(page)
File "D:\Python\Pywikibot\2022-07-22-core_stable\core_stable\pywikibot\site\_apisite.py", line 1272, in loadpageinfo
self._update_page(page, query)
File "D:\Python\Pywikibot\2022-07-22-core_stable\core_stable\pywikibot\site\_apisite.py", line 1245, in _update_page
raise InconsistentTitleError(page, pageitem['title'])
pywikibot.exceptions.InconsistentTitleError: Query on [[en:User talk:2409:40F3:2B:72D:8000::]] returned data on 'User talk:2409:40F3:2B:72D:8000:0:0:0'
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.InconsistentTitleError'>What should have happened instead?: No crash.
Other information (browser name/version, screenshots, etc.): Reproes on latest stable on Toolforge. Note similarities with T306291.