Page MenuHomePhabricator

site.get_known_families() fails for wikipedia family
Closed, ResolvedPublicBUG REPORT


>>> import pywikibot
>>> s = pywikibot.Site(fam='wikisource')
>>> x = s.get_known_families()
WARNING: <pyshell#9>:1: FutureWarning: is deprecated for 5 years; use APISite.interwiki instead.

WARNING: C:\pwb\GIT\core\pywikibot\ FutureWarning: known_families is deprecated for 5 years and 6 months; use APISite.interwiki(prefix) instead.
  return self.known_families

>>> s = pywikibot.Site(fam='wikipedia')
>>> x = s.get_known_families()
Traceback (most recent call last):
  File "<pyshell#11>", line 1, in <module>
    x = s.get_known_families()
  File "C:\pwb\GIT\core\pywikibot\families\", line 224, in get_known_families
    if site.code == 'sv':
AttributeError: 'str' object has no attribute 'code'

Event Timeline

Xqt triaged this task as Medium priority.Nov 4 2020, 11:13 AM

Change 639088 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Fix get_known_families() for wikipedia_family

Xqt changed the subtype of this task from "Task" to "Bug Report".

Change 639088 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Fix get_known_families() for wikipedia_family