Page MenuHomePhabricator

InvalidTitle: 'User:#6318414' has no title.
Closed, DuplicatePublic

Description

======================================================================
ERROR: test_intersect_newpages_and_recentchanges (tests.pagegenerators_tests.PageGeneratorIntersectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/malafaya/pywikibot-core/tests/pagegenerators_tests.py", line 846, in test_intersect_newpages_and_recentchanges
    pagegenerators.RecentChangesPageGenerator(site=site, total=200)])
  File "/home/travis/build/malafaya/pywikibot-core/tests/thread_tests.py", line 53, in assertEqualItertools
    set_result = set(datasets[0]).intersection(*datasets[1:])
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/page.py", line 311, in __hash__
    return hash(unicode(self))
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/page.py", line 279, in __unicode__
    return self.title(asLink=True, forceInterwiki=True)
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/tools/__init__.py", line 1270, in wrapper
    return obj(*__args, **__kw)
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/page.py", line 216, in title
    title = self._link.canonical_title()
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/page.py", line 4948, in canonical_title
    if self.namespace:
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/page.py", line 4913, in namespace
    self.parse()
  File "/home/travis/build/malafaya/pywikibot-core/pywikibot/page.py", line 4841, in parse
    u"'{0}' has no title.".format(self._text))
InvalidTitle: 'User:#6318414' has no title.

https://travis-ci.org/malafaya/pywikibot-core/jobs/79831683

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added projects: Pywikibot-tests, Pywikibot.
jayvdb subscribed.
Xqt triaged this task as Lowest priority.Jul 14 2017, 9:13 PM
Xqt subscribed.

This is a user and should use a User instance then. pagegenerators.PageClassGenerator could do this. On the other hand this bug is very rare and could mostly ignored for the tests.